github.com/deliveroo/gqlgen@v0.7.2/bin/release (about)

     1  #!/bin/bash
     2  
     3  set -eu
     4  
     5  if ! [ $# -eq 1 ] ; then
     6      echo "usage: ./bin/release [version]"
     7      exit 1
     8  fi
     9  
    10  VERSION=$1
    11  
    12  if ! git diff-index --quiet HEAD -- ; then
    13      echo "uncommited changes on HEAD, aborting"
    14      exit 1
    15  fi
    16  
    17  if [[ ${VERSION:0:1} != "v" ]] ; then
    18      echo "version strings must start with v"
    19      exit 1
    20  fi
    21  
    22  git fetch origin
    23  git checkout origin/master
    24  
    25  cat > graphql/version.go <<EOF
    26  package graphql
    27  
    28  const Version = "$VERSION"
    29  EOF
    30  
    31  git add .
    32  git commit -m "release $VERSION"
    33  git tag $VERSION
    34  git push origin $VERSION
    35  
    36  
    37  echo "Now go write some release notes! https://github.com/99designs/gqlgen/releases"