From d51c3b475b3cbac8635fc65deedbc4bfb35bd1cb Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 27 Mar 2016 22:48:20 +0800 Subject: [PATCH] add extension on windows platform. Signed-off-by: Bo-Yi Wu --- script/build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/script/build.sh b/script/build.sh index b1e3beb..9d5f8ae 100755 --- a/script/build.sh +++ b/script/build.sh @@ -1,7 +1,12 @@ #!/bin/sh for GOOS in darwin linux windows; do for GOARCH in 386 amd64; do - echo "Build: ${GOOS}, Arch: ${GOARCH}" - GOOS=$GOOS GOARCH=$GOARCH go build -ldflags="-w" -o bin/$GOOS/$GOARCH/gopush gopush.go; + EXE="gopush" + 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