Skip to content

Commit

Permalink
remove apimachinery from client-go/Godeps/Godeps.json; the publishing
Browse files Browse the repository at this point in the history
robot will add the latest version of apimachinery to Godeps.json.
  • Loading branch information
Chao Xu committed Feb 3, 2017
1 parent 570d450 commit 13f7231
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions staging/godeps-json-updater.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,13 @@ type Godeps struct {
Deps []Dependency
}

// rewrites the Godeps.ImportPath, removes the Deps whose ImportPath contains "k8s.io/kubernetes"
// rewrites the Godeps.ImportPath, removes the Deps whose ImportPath contains "k8s.io/kubernetes" or "k8s.io/apimachinery".
// entries for k8s.io/apimahinery will be written by the publishing robot before publishing to the repository.
func main() {
flag.Parse()
var g Godeps
if len(*godepsFile) == 0 {
log.Fatalf("absolute ath to Godeps.json is required")
log.Fatalf("absolute path to Godeps.json is required")
}
if len(*clientRepoImportPath) == 0 {
log.Fatalf("import path to a version of client-go is required")
Expand All @@ -67,6 +68,9 @@ func main() {
// removes the Deps whose ImportPath contains "k8s.io/kubernetes"
i := 0
for _, dep := range g.Deps {
if strings.Contains(dep.ImportPath, "k8s.io/apimachinery") {
continue
}
if strings.Contains(dep.ImportPath, "k8s.io/kubernetes") {
continue
}
Expand Down

0 comments on commit 13f7231

Please sign in to comment.