Created
September 29, 2019 07:10
-
-
Save hymkor/38fc83655b28c4eaddf002d4c5830cd2 to your computer and use it in GitHub Desktop.
Goの amd64/386 , windows/linux のバイナリパッケージを全部作るバッチファイル
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@setlocal | |
@set "PROMPT=%0> " | |
@call :"%1" | |
@endlocal | |
@exit /b | |
:"" | |
:"package" | |
for %%I in (386 amd64) do call :package1 windows %%I .exe | |
for %%I in (386 amd64) do call :package1 linux %%I | |
exit /b | |
:package1 | |
setlocal | |
set "GOOS=%1" | |
set "GOARCH=%2" | |
set "SUFFIX=%3" | |
for /F %%I in ('cd') do set "NAME=%%~nI" | |
go build | |
zip -9m "%NAME%-%GOOS%-%GOARCH%-%DATE:/=%.zip" %NAME%%SUFFIX% | |
endlocal | |
exit /b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment