Skip to content

Commit

Permalink
Merge pull request #175 from vektah/release_script
Browse files Browse the repository at this point in the history
Add release script
  • Loading branch information
StevenACoffman authored Jan 26, 2022
2 parents 25e3630 + 69d7afa commit f2612cc
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions bin/release
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

set -eu

if ! [ $# -eq 1 ] ; then
echo "usage: ./bin/release [version]"
exit 1
fi

VERSION=$1

if ! git diff-index --quiet HEAD -- ; then
echo "uncommited changes on HEAD, aborting"
exit 1
fi

if [[ ${VERSION:0:1} != "v" ]] ; then
echo "version strings must start with v"
exit 1
fi

git fetch origin
git checkout origin/master

git tag -a $VERSION -m $VERSION
git push origin $VERSION
git push origin HEAD:master


echo "Now go write some release notes! https://github.com/99designs/vektah/gqlparser"

0 comments on commit f2612cc

Please sign in to comment.