Skip to content

Commit

Permalink
move projectpath and generate to hack directory
Browse files Browse the repository at this point in the history
  • Loading branch information
hanweisen committed Sep 1, 2023
1 parent 46ba807 commit cee61c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion generate/generate.go → hack/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"go/token"
"os"

"github.com/kosmos.io/kosmos/projectpath"
"github.com/kosmos.io/kosmos/hack/projectpath"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion projectpath/path.go → hack/projectpath/path.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (

var (
_, b, _, _ = runtime.Caller(0)
Root = filepath.Join(filepath.Dir(b), "../")
Root = filepath.Join(filepath.Dir(b), "../../")
)
2 changes: 1 addition & 1 deletion hack/update-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
go run "${REPO_ROOT}/hack/generate/generate.go"
2 changes: 1 addition & 1 deletion test/e2e/framework/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit cee61c9

Please sign in to comment.