mirror of
https://github.com/hashicorp/vault.git
synced 2025-11-29 06:31:10 +01:00
make windows: enclose all paths in double quotes
This commit is contained in:
parent
0074f64701
commit
b38d8afa54
8
make.bat
8
make.bat
@ -80,14 +80,14 @@ REM any common errors.
|
|||||||
set _vetExitCode=0
|
set _vetExitCode=0
|
||||||
set _VAULT_PKG_DIRS=%TEMP%\vault-pkg-dirs.txt
|
set _VAULT_PKG_DIRS=%TEMP%\vault-pkg-dirs.txt
|
||||||
|
|
||||||
go list -f {{.Dir}} ./... >%_VAULT_PKG_DIRS%
|
go list -f {{.Dir}} ./... >"%_VAULT_PKG_DIRS%"
|
||||||
REM Skip the first row, which is the main vault package (.*github.com/hashicorp/vault$)
|
REM Skip the first row, which is the main vault package (.*github.com/hashicorp/vault$)
|
||||||
for /f "delims= skip=1" %%d in (%_VAULT_PKG_DIRS%) do (
|
for /f "delims= skip=1" %%d in ("%_VAULT_PKG_DIRS%") do (
|
||||||
go tool vet %_VETARGS% %%d
|
go tool vet %_VETARGS% "%%d"
|
||||||
if ERRORLEVEL 1 set _vetExitCode=1
|
if ERRORLEVEL 1 set _vetExitCode=1
|
||||||
call :setMaxExitCode %_vetExitCode%
|
call :setMaxExitCode %_vetExitCode%
|
||||||
)
|
)
|
||||||
del /f %_VAULT_PKG_DIRS% 2>NUL
|
del /f "%_VAULT_PKG_DIRS%" 2>NUL
|
||||||
if %_vetExitCode% equ 0 exit /b %_EXITCODE%
|
if %_vetExitCode% equ 0 exit /b %_EXITCODE%
|
||||||
echo.
|
echo.
|
||||||
echo Vet found suspicious constructs. Please check the reported constructs
|
echo Vet found suspicious constructs. Please check the reported constructs
|
||||||
|
|||||||
@ -17,13 +17,13 @@ set _GIT_DIRTY_FILE=%TEMP%\vault-git_dirty.txt
|
|||||||
set _NUL_CMP_FILE=%TEMP%\vault-nul_cmp.txt
|
set _NUL_CMP_FILE=%TEMP%\vault-nul_cmp.txt
|
||||||
type nul >%_NUL_CMP_FILE%
|
type nul >%_NUL_CMP_FILE%
|
||||||
|
|
||||||
git rev-parse HEAD >%_GIT_COMMIT_FILE%
|
git rev-parse HEAD >"%_GIT_COMMIT_FILE%"
|
||||||
set /p _GIT_COMMIT=<%_GIT_COMMIT_FILE%
|
set /p _GIT_COMMIT=<"%_GIT_COMMIT_FILE%"
|
||||||
del /f "%_GIT_COMMIT_FILE%" 2>nul
|
del /f "%_GIT_COMMIT_FILE%" 2>nul
|
||||||
|
|
||||||
set _GIT_DIRTY=
|
set _GIT_DIRTY=
|
||||||
git status --porcelain >%_GIT_DIRTY_FILE%
|
git status --porcelain >"%_GIT_DIRTY_FILE%"
|
||||||
fc %_GIT_DIRTY_FILE% %_NUL_CMP_FILE% >nul
|
fc "%_GIT_DIRTY_FILE%" "%_NUL_CMP_FILE%" >nul
|
||||||
if errorlevel 1 set _GIT_DIRTY=+CHANGES
|
if errorlevel 1 set _GIT_DIRTY=+CHANGES
|
||||||
del /f "%_GIT_DIRTY_FILE%" 2>nul
|
del /f "%_GIT_DIRTY_FILE%" 2>nul
|
||||||
del /f "%_NUL_CMP_FILE%" 2>nul
|
del /f "%_NUL_CMP_FILE%" 2>nul
|
||||||
@ -46,19 +46,19 @@ if not %_DEV_BUILD% equ 1 goto build
|
|||||||
|
|
||||||
set _ORIGINAL_GOPATH=%GOPATH%
|
set _ORIGINAL_GOPATH=%GOPATH%
|
||||||
set _GODEP_PATH_FILE=%TEMP%\vault-godep-path.txt
|
set _GODEP_PATH_FILE=%TEMP%\vault-godep-path.txt
|
||||||
godep path >%_GODEP_PATH_FILE%
|
godep path >"%_GODEP_PATH_FILE%"
|
||||||
set /p GOPATH=<%_GODEP_PATH_FILE%
|
set /p GOPATH=<"%_GODEP_PATH_FILE%"
|
||||||
del /f "%_GODEP_PATH_FILE%" 2>nul
|
del /f "%_GODEP_PATH_FILE%" 2>nul
|
||||||
set GOPATH=%GOPATH%;%_ORIGINAL_GOPATH%
|
set GOPATH=%GOPATH%;%_ORIGINAL_GOPATH%
|
||||||
|
|
||||||
:devbuild
|
:devbuild
|
||||||
echo ==^> Preparing for development build...
|
echo ==^> Preparing for development build...
|
||||||
set _GO_ENV_TMP_FILE=%TEMP%\vault-go-env.txt
|
set _GO_ENV_TMP_FILE=%TEMP%\vault-go-env.txt
|
||||||
go env GOARCH >%_GO_ENV_TMP_FILE%
|
go env GOARCH >"%_GO_ENV_TMP_FILE%"
|
||||||
set /p _XC_ARCH=<%_GO_ENV_TMP_FILE%
|
set /p _XC_ARCH=<"%_GO_ENV_TMP_FILE%"
|
||||||
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
||||||
go env GOOS >%_GO_ENV_TMP_FILE%
|
go env GOOS >"%_GO_ENV_TMP_FILE%"
|
||||||
set /p _XC_OS=<%_GO_ENV_TMP_FILE%
|
set /p _XC_OS=<"%_GO_ENV_TMP_FILE%"
|
||||||
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
||||||
|
|
||||||
:build
|
:build
|
||||||
@ -78,16 +78,16 @@ if %_EXITCODE% equ 1 exit /b %_EXITCODE%
|
|||||||
|
|
||||||
set _GO_ENV_TMP_FILE=%TEMP%\vault-go-env.txt
|
set _GO_ENV_TMP_FILE=%TEMP%\vault-go-env.txt
|
||||||
|
|
||||||
go env GOPATH >%_GO_ENV_TMP_FILE%
|
go env GOPATH >"%_GO_ENV_TMP_FILE%"
|
||||||
set /p _GOPATH=<%_GO_ENV_TMP_FILE%
|
set /p _GOPATH=<"%_GO_ENV_TMP_FILE%"
|
||||||
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
||||||
|
|
||||||
go env GOARCH >%_GO_ENV_TMP_FILE%
|
go env GOARCH >"%_GO_ENV_TMP_FILE%"
|
||||||
set /p _GOARCH=<%_GO_ENV_TMP_FILE%
|
set /p _GOARCH=<"%_GO_ENV_TMP_FILE%"
|
||||||
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
||||||
|
|
||||||
go env GOOS >%_GO_ENV_TMP_FILE%
|
go env GOOS >"%_GO_ENV_TMP_FILE%"
|
||||||
set /p _GOOS=<%_GO_ENV_TMP_FILE%
|
set /p _GOOS=<"%_GO_ENV_TMP_FILE%"
|
||||||
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
del /f "%_GO_ENV_TMP_FILE%" 2>nul
|
||||||
|
|
||||||
REM Copy our OS/Arch to the bin/ directory
|
REM Copy our OS/Arch to the bin/ directory
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user