Skip to content

Commit

Permalink
Update build script, push release to GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
Niek committed Jul 10, 2019
1 parent a5668ca commit dffaf18
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion build.sh
Expand Up @@ -2,6 +2,7 @@

if [ $# -ne 1 ]; then
echo "Usage: ./build.sh <version number>"
echo "Suggested version: "$(git describe --tags | tr -d v | awk '{printf "%.1f", $1 + .1}')
exit
fi

Expand All @@ -10,6 +11,7 @@ VERSION=$1
echo "Build packages with version number ${VERSION}"

platforms=("windows/amd64" "windows/386" "darwin/amd64" "linux/386" "linux/amd64")
files=()

for platform in "${platforms[@]}"
do
Expand All @@ -26,7 +28,10 @@ do
echo 'An error has occurred! Aborting the script execution...'
exit 1
fi

files+=($output_name)
done

git tag v${VERSION}
git push origin --tags
git push origin --tags
hub release create -do $(for f in "${files[@]}"; do echo "-a "$f; done) -m "Release v${VERSION}" v${VERSION}

0 comments on commit dffaf18

Please sign in to comment.