mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	remove apimachinery from client-go/Godeps/Godeps.json; the publishing
robot will add the latest version of apimachinery to Godeps.json.
This commit is contained in:
		@@ -43,12 +43,13 @@ type Godeps struct {
 | 
				
			|||||||
	Deps         []Dependency
 | 
						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() {
 | 
					func main() {
 | 
				
			||||||
	flag.Parse()
 | 
						flag.Parse()
 | 
				
			||||||
	var g Godeps
 | 
						var g Godeps
 | 
				
			||||||
	if len(*godepsFile) == 0 {
 | 
						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 {
 | 
						if len(*clientRepoImportPath) == 0 {
 | 
				
			||||||
		log.Fatalf("import path to a version of client-go is required")
 | 
							log.Fatalf("import path to a version of client-go is required")
 | 
				
			||||||
@@ -67,6 +68,9 @@ func main() {
 | 
				
			|||||||
	// removes the Deps whose ImportPath contains "k8s.io/kubernetes"
 | 
						// removes the Deps whose ImportPath contains "k8s.io/kubernetes"
 | 
				
			||||||
	i := 0
 | 
						i := 0
 | 
				
			||||||
	for _, dep := range g.Deps {
 | 
						for _, dep := range g.Deps {
 | 
				
			||||||
 | 
							if strings.Contains(dep.ImportPath, "k8s.io/apimachinery") {
 | 
				
			||||||
 | 
								continue
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		if strings.Contains(dep.ImportPath, "k8s.io/kubernetes") {
 | 
							if strings.Contains(dep.ImportPath, "k8s.io/kubernetes") {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user