Add releash script

pull/3/head
miraclesu 2017-05-16 16:25:35 +08:00
parent 3c2aad71b1
commit 20ce162667
1 changed files with 22 additions and 0 deletions

22
release.sh Normal file
View File

@ -0,0 +1,22 @@
#!/bin/sh
version=v0.1
if [[ $# -gt 0 ]]; then
version="$1"
fi
declare -a goos=(
linux
darwin
)
for os in "${goos[@]}"; do
export GOOS=$os GOARCH=amd64
echo building $GOOS-$GOARCH
sh build.sh
mv dist cronsun-$version
7z a cronsun-$version-$GOOS-$GOARCH.zip cronsun-$version
rm -rf cronsun-$version
echo
done