Skip to content

Commit

Permalink
Update build.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Jianhui Zhao <[email protected]>
  • Loading branch information
Jianhui Zhao committed Oct 11, 2018
1 parent 51c347b commit 7d8e248
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,17 @@ generate() {

GOOS=$os GOARCH=$arch go build -ldflags='-s -w' -o output/$dir/$bin

[ "$os" = "windows" ] || {
cd output
cd output

if [ "$os" = "windows" ];
then
zip -r $dir.zip $dir
rm -r $dir
else
tar zcvf $dir.tar.gz $dir --remove-files
cd -
}
fi

cd ..
}

rm -rf output
Expand Down

0 comments on commit 7d8e248

Please sign in to comment.