#!/bin/bash BRANCH="$(git rev-parse --abbrev-ref HEAD)" if [[ "$BRANCH" != "master" ]]; then echo "Not on master branch, aborting" exit 1 fi today=`date +"%Y-%m-%d"` tag=v${today} git tag -a $tag -m "Release to production on ${today}" echo "please push the tag with" echo "git push origin $tag"