Skip to content

Instantly share code, notes, and snippets.

@spamoom
Created May 14, 2015 11:24
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 spamoom/12121932d1460dc4ea69 to your computer and use it in GitHub Desktop.
Save spamoom/12121932d1460dc4ea69 to your computer and use it in GitHub Desktop.
Update and tag a version
#!/bin/sh
if [ $1 ]
then
echo $1 > version.txt
echo "Wrote version.txt file\n"
git add .
git commit -m "Bumping version file to $1"
git tag -a $1 -m "Bumping version $1"
echo "Created tag: $1\n"
git push origin $1
echo "Pushed $1 tag to origin\n"
else
echo "No version specified.\n"
fi
@samturrell
Copy link

Put in devtools 😃

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