Last active
August 29, 2015 13:56
-
-
Save tbranyen/9298643 to your computer and use it in GitHub Desktop.
Release Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./release.sh 0.1.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 - |
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
Might be a little more robust: