diff --git a/generate/generate.go b/hack/generate/generate.go similarity index 97% rename from generate/generate.go rename to hack/generate/generate.go index e41bac7e8..1e832344f 100644 --- a/generate/generate.go +++ b/hack/generate/generate.go @@ -9,7 +9,7 @@ import ( "go/token" "os" - "github.com/kosmos.io/kosmos/projectpath" + "github.com/kosmos.io/kosmos/hack/projectpath" ) func main() { diff --git a/projectpath/path.go b/hack/projectpath/path.go similarity index 64% rename from projectpath/path.go rename to hack/projectpath/path.go index 3bf13cdeb..777f1bf61 100644 --- a/projectpath/path.go +++ b/hack/projectpath/path.go @@ -7,5 +7,5 @@ import ( var ( _, b, _, _ = runtime.Caller(0) - Root = filepath.Join(filepath.Dir(b), "../") + Root = filepath.Join(filepath.Dir(b), "../../") ) diff --git a/hack/update-crds.sh b/hack/update-crds.sh index 5b1bc6344..6d44b72bc 100755 --- a/hack/update-crds.sh +++ b/hack/update-crds.sh @@ -14,4 +14,4 @@ export PATH=$PATH:$GOPATH/bin controller-gen crd paths=./pkg/apis/kosmos/... output:crd:dir="${REPO_ROOT}/deploy/crds" -go run "${REPO_ROOT}/generate/generate.go" \ No newline at end of file +go run "${REPO_ROOT}/hack/generate/generate.go" \ No newline at end of file diff --git a/test/e2e/framework/cluster.go b/test/e2e/framework/cluster.go index 696c8afe1..4a5a8b6ab 100644 --- a/test/e2e/framework/cluster.go +++ b/test/e2e/framework/cluster.go @@ -12,9 +12,9 @@ import ( "k8s.io/client-go/tools/clientcmd" "k8s.io/klog/v2" + "github.com/kosmos.io/kosmos/hack/projectpath" clusterlinkv1alpha1 "github.com/kosmos.io/kosmos/pkg/apis/kosmos/v1alpha1" "github.com/kosmos.io/kosmos/pkg/generated/clientset/versioned" - "github.com/kosmos.io/kosmos/projectpath" ) func FetchClusters(client versioned.Interface) ([]clusterlinkv1alpha1.Cluster, error) {