mirror of
				https://github.com/optim-enterprises-bv/vault.git
				synced 2025-10-31 18:48:08 +00:00 
			
		
		
		
	Minor tweaks to Windows build scripts (#3931)
This commit is contained in:
		
							
								
								
									
										10
									
								
								make.bat
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								make.bat
									
									
									
									
									
								
							| @@ -6,7 +6,8 @@ set _EXITCODE=0 | |||||||
| REM If no target is provided, default to test. | REM If no target is provided, default to test. | ||||||
| if [%1]==[] goto test | if [%1]==[] goto test | ||||||
|  |  | ||||||
| set _TARGETS=bin,dev,generate,test,testacc,testrace,vet | set _TARGETS=bin,bootstrap,dev,generate,test,testacc,testrace,vet | ||||||
|  | set _EXTERNAL_TOOLS=github.com/mitchellh/gox,github.com/kardianos/govendor | ||||||
|  |  | ||||||
| REM Run target. | REM Run target. | ||||||
| for %%a in (%_TARGETS%) do (if x%1==x%%a goto %%a) | for %%a in (%_TARGETS%) do (if x%1==x%%a goto %%a) | ||||||
| @@ -18,6 +19,11 @@ REM bin generates the releaseable binaries for Vault | |||||||
| 	call .\scripts\windows\build.bat "%CD%" | 	call .\scripts\windows\build.bat "%CD%" | ||||||
| 	goto :eof | 	goto :eof | ||||||
|  |  | ||||||
|  | REM bootstrap downloads required build tools | ||||||
|  | :bootstrap | ||||||
|  |     for %%t in (%_EXTERNAL_TOOLS%) do (go get -u -v %%t) | ||||||
|  | 	goto :eof | ||||||
|  |  | ||||||
| REM dev creates binaries for testing Vault locally. These are put | REM dev creates binaries for testing Vault locally. These are put | ||||||
| REM into ./bin/ as well as %GOPATH%/bin | REM into ./bin/ as well as %GOPATH%/bin | ||||||
| :dev | :dev | ||||||
| @@ -28,7 +34,7 @@ REM into ./bin/ as well as %GOPATH%/bin | |||||||
| REM generate runs `go generate` to build the dynamically generated | REM generate runs `go generate` to build the dynamically generated | ||||||
| REM source files. | REM source files. | ||||||
| :generate | :generate | ||||||
| 	go list ./... | findstr /v vendor | go generate | 	for /F "usebackq" %%f in (`go list ./... ^| findstr /v vendor`) do @go generate %%f | ||||||
| 	goto :eof | 	goto :eof | ||||||
|  |  | ||||||
| REM test runs the unit tests and vets the code. | REM test runs the unit tests and vets the code. | ||||||
|   | |||||||
| @@ -60,7 +60,7 @@ echo ==^> Building... | |||||||
| gox^ | gox^ | ||||||
|  -os="%_XC_OS%"^ |  -os="%_XC_OS%"^ | ||||||
|  -arch="%_XC_ARCH%"^ |  -arch="%_XC_ARCH%"^ | ||||||
|  -ldflags "-X github.com/hashicorp/vault/version.GitCommit %_GIT_COMMIT%%_GIT_DIRTY%"^ |  -ldflags "-X github.com/hashicorp/vault/version.GitCommit=%_GIT_COMMIT%%_GIT_DIRTY%"^ | ||||||
|  -output "pkg/{{.OS}}_{{.Arch}}/vault"^ |  -output "pkg/{{.OS}}_{{.Arch}}/vault"^ | ||||||
|  . |  . | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Guillaume
					Guillaume