Last active
August 29, 2015 14:18
-
-
Save Starefossen/4c272ff5fe214fa0b45f to your computer and use it in GitHub Desktop.
Tagging you releases in git
This file contains hidden or 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
#!/bin/bash | |
if [ -z "$1" ]; then | |
echo "Usage: ./release.sh x.y.z" | |
exit 1 | |
fi | |
# update version in package.json | |
sed -i '' "s/\"version\":.*/\"version\": \"$1\",/g" package.json | |
# commit the new package.json | |
git commit wercker-step.yml -m "Tag release v$1" | |
# git tag the new release | |
git tag -a "v$1" -m "v$1" -s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment