add extension on windows platform.

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
This commit is contained in:
Bo-Yi Wu 2016-03-27 22:48:20 +08:00
parent 3114d1b2f8
commit d51c3b475b
1 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,12 @@
#!/bin/sh #!/bin/sh
for GOOS in darwin linux windows; do for GOOS in darwin linux windows; do
for GOARCH in 386 amd64; do for GOARCH in 386 amd64; do
echo "Build: ${GOOS}, Arch: ${GOARCH}" EXE="gopush"
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/gopush gopush.go; if [ $GOOS == "windows" ]; then
EXE="gopush.exe"
fi
echo "Build: ${GOOS}, Arch: ${GOARCH}, EXE: ${EXE}"
GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/${EXE} gopush.go;
done done
done done