Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add release script #175

Merged
merged 1 commit into from
Jan 26, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"