Skip to content
This repository has been archived by the owner on Feb 2, 2023. It is now read-only.

Commit

Permalink
Minor tweaks to Windows build scripts (hashicorp#3931)
Browse files Browse the repository at this point in the history
  • Loading branch information
ixe013 authored and jefferai committed Feb 8, 2018
1 parent dd9f17e commit d6e38dd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand All @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion scripts/windows/build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -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"^
.

Expand Down

0 comments on commit d6e38dd

Please sign in to comment.