Skip to content

Commit

Permalink
fix up release script
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Apr 16, 2017
1 parent 98a6184 commit 7a1268e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,32 @@ usage() {
exit 1
}

VERSION=$1
if [ "$VERSION" = "" ]; then
GITHUB_TOKEN=$1
if [ "$GITHUB_TOKEN" = "" ]; then
echo "Need to specify a GITHUB_TOKEN!"
usage
fi

version=$1
if [ "$version" = "" ]; then
echo "Need to specify a version!"
usage
fi

shift
MSG=$@
if [ "$MSG" = "" ]; then
msg=$@
if [ "$msg" = "" ]; then
echo "Need to specify a message!"
usage
fi

set -e -u -x

temple file < $basedir/scripts/README.tmpl.md > $basedir/README.md -var "version=$VERSION"
temple file < $basedir/scripts/README.tmpl.md > $basedir/README.md -var "version=$version"

git add $basedir/README.md
git commit -m "$MSG"
git tag -a $VERSION -m "$MSG"
git commit -m "$msg"
git tag -a $version -m "$msg"

goreleaser --config $basedir/goreleaser.yaml

Expand Down

0 comments on commit 7a1268e

Please sign in to comment.