mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +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.
|
||||
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.
|
||||
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%"
|
||||
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 into ./bin/ as well as %GOPATH%/bin
|
||||
:dev
|
||||
@@ -28,7 +34,7 @@ REM into ./bin/ as well as %GOPATH%/bin
|
||||
REM generate runs `go generate` to build the dynamically generated
|
||||
REM source files.
|
||||
:generate
|
||||
go list ./... | findstr /v vendor | go generate
|
||||
for /F "usebackq" %%f in (`go list ./... ^| findstr /v vendor`) do @go generate %%f
|
||||
goto :eof
|
||||
|
||||
REM test runs the unit tests and vets the code.
|
||||
|
||||
@@ -60,7 +60,7 @@ echo ==^> Building...
|
||||
gox^
|
||||
-os="%_XC_OS%"^
|
||||
-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"^
|
||||
.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user