My git release script
I always had issues remembering how to create releases. So in order to standardise things, I wrote this script:
So whenever I am ready to release I would then just issue the command:
You obviously need
git. But also you would need
Your repository must also be clean, without any pending commits.
You must be on the default branch (usually
master), unless doing a pre-release.
Optionally, you may have a
containing checking scripts.
What happens on release
--tagswill be synchronised with local tags.
- if a tag of the same name already exists then, release will be stopped.
- check if we are on the
defaultbranch (unless pre-release)
- check if there are any uncomitted changes.
- If available,
wfscripts/checksis run using
- Will create release notes based on log entries since the last release (previous annotated tagged commit)
version.his updated and comitted.
- A new annotated tag is created.
- Commits and tags are push to remote (origin).
- Release is created using
You can create pre-releases. These do not have to be on the
default branch. To do this use the
--rc (Release candidate)
This will create a release in
github but tag it as pre-release.
After release, you may delete all pre-release candidates: