Make a release by determining the next version, updating the version in the code/config, update sentry and push the release.
It builds on the command line tool for git flow: https://nvie.com/posts/a-successful-git-branching-model/
git flow initwas run withdevandmainas the development and production branches- run
git config --global tag.sort -version:refname
Put this file into your PATH.
Note: Best is to create a symlink to make it easy to keep the file updated.
sudo ln -s [ABSOLUTE_PATH]/make-release/make-release.sh /usr/local/bin/make-release.sh
Add a "make-release" file into each repository where you want to use make-release.sh with the following contents:
- line 1 (version file name): The file name where the version number is tracked (comma separated list)
- line 2 (sentry organization): Name of the sentry organization, keep empty of sentry is not used
- line 3 (sentry slug): Name of the sentry slug (
sentry-cli projects -o [organization name] list), keep empty of sentry is not used - line 4 (build command): Command to run to build the project, keep empty if sourcemaps are not uploaded during tagging
- line 5 (build path): Relative path for where the build command geneerates the .map files
fe.
app/main.py
foo-bar
nlp-api
npm run build
./dist
This starts a branch, updates the version file and creates the sentry release if sentry slug is set
To start a major release
make-release.sh major
To start a minor release
make-release.sh minor
To start a patch release
make-release.sh patch
Commit the change to the version file and any other release preparations.
make-release.sh finish
Push the release inclusing tags as well as finalize the release on sentry of a sentry slug is set
make-release.sh finalize