Skip to content

Instantly share code, notes, and snippets.

@Starefossen
Last active August 29, 2015 14:18
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 Starefossen/4c272ff5fe214fa0b45f to your computer and use it in GitHub Desktop.
Save Starefossen/4c272ff5fe214fa0b45f to your computer and use it in GitHub Desktop.
Tagging you releases in git
#!/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