Provide scripts for tagging releases

This commit is contained in:
Ramon Wenger 2022-05-10 10:41:32 +02:00
parent 98d3966bc3
commit e594d76671
3 changed files with 42 additions and 0 deletions

View File

@ -178,6 +178,22 @@ deployed in the evening, if there are new commits that are not yet on Heroku.
### Tagging ### Tagging
#### Update:
Please use one of the provided scripts in `bin`
```./bin/tag-release.sh```
or
```./bin/tag-hotfix.sh```
and follow the instructions.
Note: Please make sure you're one the master branch first.
#### Manual Way (deprecated)
Whenever you do a new release, please tag the current commit after merging with the current date: Whenever you do a new release, please tag the current commit after merging with the current date:
git tag -a v2019-09-10 git tag -a v2019-09-10

13
bin/tag-hotfix.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
if [[ "$BRANCH" != "master" ]]; then
echo "Not on master branch, aborting"
exit 1
fi
today=`date "+%Y-%m-%d"`
hotfix_tag=v$today.hotfix
git tag -am "Hotfix release to production on $today" $hotfix_tag
echo "please push the tag with"
echo "git push origin $hotfix_tag"

13
bin/tag-release.sh Executable file
View File

@ -0,0 +1,13 @@
#!/bin/bash
BRANCH="$(git rev-parse --abbrev-ref HEAD)"
if [[ "$BRANCH" != "master" ]]; then
echo "Not on master branch, aborting"
exit 1
fi
today=`date +"%Y-%m-%d"`
tag=v${today}
git tag -a $tag -m "Release to production on ${today}"
echo "please push the tag with"
echo "git push origin $tag"