Created
October 26, 2016 10:49
-
-
Save simonewebdesign/f3f09b6542c4e0d6ba63b8caaaae6e16 to your computer and use it in GitHub Desktop.
Create a new release on GitHub by reading from a VERSION file.
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
#!/bin/bash | |
## | |
# This script creates a new release by reading from VERSION file. | |
## | |
set -e # Exit on error | |
set +x # Debug mode (-x on, +x off) | |
version="$(cat VERSION)" | |
release="Release $version" | |
ls | grep -v build | xargs rm -Rf # remove all but build | |
mv build/* . | |
git add --all | |
git commit -m "$release" | |
git tag -a "$version" -m "$release" | |
git push origin releases --tags | |
echo "$release successful" | |
git reset --hard HEAD^ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment