Skip to content

Instantly share code, notes, and snippets.

@tbranyen
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tbranyen/9298643 to your computer and use it in GitHub Desktop.
Save tbranyen/9298643 to your computer and use it in GitHub Desktop.
Release Script
./release.sh 0.1.0
# If it's already created then set the symbolic reference.
if [ `git checkout --orphan release &> /dev/null; echo $?` -gt 0 ] ; then
git symbolic-ref HEAD refs/heads/release
fi
# Add specific files.
git add dist/lib.js
git add README
git add node_modules
# Make the version commit.
git commit -m "Tagging version $1"
# Tag this version.
git tag $1
# Return to previous branch.
git checkout -
@jugglinmike
Copy link

Might be a little more robust:

- # Return to master.
- git checkout master
+ # Return to previous branch.
+ git checkout -

@tbranyen
Copy link
Author

tbranyen commented Mar 1, 2014

Per @jugglinmike, should investigate how to fail if files are missing. This would alleviate the potential for an empty relesae.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment