Skip to content

Instantly share code, notes, and snippets.

@themouette
Created November 19, 2014 11:19
Show Gist options
  • Save themouette/df9c5837733d15c38a14 to your computer and use it in GitHub Desktop.
Save themouette/df9c5837733d15c38a14 to your computer and use it in GitHub Desktop.
Publish script to deploy branch
#!/usr/bin/env bash
ORIG_BRANCH="$(git rev-parse --abbrev-ref HEAD)"
git checkout -b release && \
grunt release && \
git add -f public && \
git commit -m 'Latest release' && \
git push -f deploy release:master && \
git tag "release-`date +'%F-%s'`"
git checkout "${ORIG_BRANCH}"&& \
git branch -D release
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment