Skip to content

Commit

Permalink
move version package from cmd to util
Browse files Browse the repository at this point in the history
since version is used from various locations in the code, made more sense to move it out of cmd
  • Loading branch information
nader-ziada committed Jan 13, 2021
1 parent 953ad25 commit ac9fa6e
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion bootstrap/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4"
kubeadmbootstrapcontrollers "sigs.k8s.io/cluster-api/bootstrap/kubeadm/controllers"
"sigs.k8s.io/cluster-api/cmd/version"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4"
"sigs.k8s.io/cluster-api/feature"
"sigs.k8s.io/cluster-api/util/version"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/cluster/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import (
"k8s.io/client-go/rest"
"k8s.io/client-go/tools/clientcmd"
"sigs.k8s.io/cluster-api/cmd/clusterctl/internal/scheme"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/util/version"
"sigs.k8s.io/controller-runtime/pkg/client"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/client/cluster/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (

. "github.com/onsi/gomega"
"sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/util/version"
)

var _ Proxy = &test.FakeProxy{}
Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (

"github.com/pkg/errors"
"github.com/spf13/cobra"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/util/version"
"sigs.k8s.io/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/version_checker.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import (
"k8s.io/client-go/util/homedir"
"sigs.k8s.io/cluster-api/cmd/clusterctl/client/config"
logf "sigs.k8s.io/cluster-api/cmd/clusterctl/log"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/util/version"
"sigs.k8s.io/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion cmd/clusterctl/cmd/version_checker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
. "github.com/onsi/gomega"
"k8s.io/client-go/util/homedir"
"sigs.k8s.io/cluster-api/cmd/clusterctl/internal/test"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/util/version"
"sigs.k8s.io/yaml"
)

Expand Down
2 changes: 1 addition & 1 deletion controlplane/kubeadm/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ import (
"k8s.io/klog/klogr"
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
kubeadmbootstrapv1 "sigs.k8s.io/cluster-api/bootstrap/kubeadm/api/v1alpha4"
"sigs.k8s.io/cluster-api/cmd/version"
kcpv1 "sigs.k8s.io/cluster-api/controlplane/kubeadm/api/v1alpha4"
kubeadmcontrolplanecontrollers "sigs.k8s.io/cluster-api/controlplane/kubeadm/controllers"
"sigs.k8s.io/cluster-api/util/version"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
Expand Down
2 changes: 1 addition & 1 deletion hack/version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ version::ldflags() {
local key=${1}
local val=${2}
ldflags+=(
"-X 'sigs.k8s.io/cluster-api/cmd/version.${key}=${val}'"
"-X 'sigs.k8s.io/cluster-api/util/version.${key}=${val}'"
)
}

Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@ import (
"k8s.io/klog"
"k8s.io/klog/klogr"
clusterv1 "sigs.k8s.io/cluster-api/api/v1alpha4"
"sigs.k8s.io/cluster-api/cmd/version"
"sigs.k8s.io/cluster-api/controllers"
"sigs.k8s.io/cluster-api/controllers/remote"
addonsv1 "sigs.k8s.io/cluster-api/exp/addons/api/v1alpha4"
addonscontrollers "sigs.k8s.io/cluster-api/exp/addons/controllers"
expv1 "sigs.k8s.io/cluster-api/exp/api/v1alpha4"
expcontrollers "sigs.k8s.io/cluster-api/exp/controllers"
"sigs.k8s.io/cluster-api/feature"
"sigs.k8s.io/cluster-api/util/version"
ctrl "sigs.k8s.io/controller-runtime"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/controller"
Expand Down
File renamed without changes.

0 comments on commit ac9fa6e

Please sign in to comment.