mirror of https://github.com/kubernetes/kops.git
				
				
				
			Use -mod=vendor for most go commands
Without this set, go 1.13 was redownloading all dependencies into the module cache, effectively ignoring the vendor directory. This instructs go 1.13 to always use (and verify the contents of) the vendor directory. See an example prow job here: https://prow.k8s.io/view/gcs/kubernetes-jenkins/pr-logs/pull/kops/9389/pull-kops-verify-govet/1273460433402990595 All of the `go: downloading` and `go: extracting` lines indicate its downloading those dependencies rather than using the vendor directory.
This commit is contained in:
		
							parent
							
								
									e7d5d323bf
								
							
						
					
					
						commit
						e42431ff06
					
				
							
								
								
									
										4
									
								
								Makefile
								
								
								
								
							
							
						
						
									
										4
									
								
								Makefile
								
								
								
								
							| 
						 | 
				
			
			@ -45,6 +45,9 @@ BAZEL_CONFIG?=
 | 
			
		|||
API_OPTIONS?=
 | 
			
		||||
GCFLAGS?=
 | 
			
		||||
 | 
			
		||||
# This can be removed when we upgrade to go 1.14
 | 
			
		||||
export GOFLAGS=-mod=vendor
 | 
			
		||||
 | 
			
		||||
UPLOAD_CMD=$(KOPS_ROOT)/hack/upload
 | 
			
		||||
 | 
			
		||||
# Unexport environment variables that can affect tests and are not used in builds
 | 
			
		||||
| 
						 | 
				
			
			@ -460,6 +463,7 @@ gomod-prereqs:
 | 
			
		|||
	(which bazel > /dev/null) || (echo "gomod requires that bazel is installed"; exit 1)
 | 
			
		||||
 | 
			
		||||
.PHONY: gomod
 | 
			
		||||
gomod: export GOFLAGS=
 | 
			
		||||
gomod: gomod-prereqs
 | 
			
		||||
	GO111MODULE=on go mod vendor
 | 
			
		||||
	# Switch weavemesh to use peer_name_hash - bazel rule-go doesn't support build tags yet
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue