Skip to content

Instantly share code, notes, and snippets.

@minimal
Created June 27, 2013 14:17
Show Gist options
  • Save minimal/5876785 to your computer and use it in GitHub Desktop.
Save minimal/5876785 to your computer and use it in GitHub Desktop.
# !/usr/bin/env sh
hook() {
local hook=.git/hooks/$1.sh
if test -f $hook; then
echo "... $1"
. $hook
fi
}
if test $# -gt 0; then
hook pre-release
echo "... releasing $1"
git merge --no-ff -m "Merge branch 'release/$1'" develop
git tag $1 -a -m "Release $1" # \
# && git push --follow-tags
# && git push $2 --tags \
# && hook post-release \
# && echo "... complete"
else
echo "tag required" 1>&2 && exit 1
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment