...
1#!/bin/bash
2
3set -eu
4
5if ! [ $# -eq 1 ] ; then
6 echo "usage: ./bin/release [version]"
7 exit 1
8fi
9
10VERSION=$1
11
12if ! git diff-index --quiet HEAD -- ; then
13 echo "uncommited changes on HEAD, aborting"
14 exit 1
15fi
16
17if [[ ${VERSION:0:1} != "v" ]] ; then
18 echo "version strings must start with v"
19 exit 1
20fi
21
22git fetch origin
23git checkout origin/master
24
25git tag -a $VERSION -m $VERSION
26git push origin $VERSION
27git push origin HEAD:master
28
29
30echo "Now go write some release notes! https://github.com/vektah/gqlparser/releases"
View as plain text