Skip to content

Commit 3c17797

Browse files
committed
build zip files for windows releases
1 parent bdd2e8d commit 3c17797

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ deploy:
1919
- $TRAVIS_BUILD_DIR/tar/gotournament-linux-amd64.tar.gz
2020
- $TRAVIS_BUILD_DIR/tar/gotournament-linux-arm64.tar.gz
2121
- $TRAVIS_BUILD_DIR/tar/gotournament-linux-arm.tar.gz
22-
- $TRAVIS_BUILD_DIR/tar/gotournament-windows-386.tar.gz
23-
- $TRAVIS_BUILD_DIR/tar/gotournament-windows-amd64.tar.gz
22+
- $TRAVIS_BUILD_DIR/tar/gotournament-windows-386.zip
23+
- $TRAVIS_BUILD_DIR/tar/gotournament-windows-amd64.zip
2424
skip_cleanup: true
2525
overwrite: true
2626
on:

build.sh

+8-1
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,12 @@ do
3030
cp -r tpl bin/$goos/$goarch/tpl
3131

3232
# pack
33-
tar cfvz tar/$name-$goos-$goarch.tar.gz -C bin/$goos/$goarch .
33+
if [ "$goos" == "windows" ]; then
34+
base=$(pwd)
35+
pushd bin/$goos/$goarch
36+
zip -r $base/tar/$name-$goos-$goarch.zip ./*
37+
popd
38+
else
39+
tar cfvz tar/$name-$goos-$goarch.tar.gz -C bin/$goos/$goarch .
40+
fi
3441
done

0 commit comments

Comments
 (0)