build: bump versions only on local master

A bump amends and tags the last commit, so made on a feature branch it
tags a commit that master may never contain. The targets now refuse any
branch but master, and a detached HEAD.
This commit is contained in:
Ansho Rei
2026-11-04 09:24:54 +01:00
parent 530676e3ac
commit 8f8004c205
2 changed files with 11 additions and 3 deletions
+1
View File
@@ -90,4 +90,5 @@ Every finished ticket bumps the version, so a build on the Deck can be matched t
- `make patch` for a bug fix, `make minor` for a feature, `make major` only when a breaking change has been decided.
- Before bumping, add a `## v<new> (<date>)` entry at the top of `CHANGELOG.md`, with `### Features` and `### Bug fixes` subsections (leave out an empty one), and commit it with the change. `make version` prints the current version.
- Bump on local `master` only: fast-forward `master` to the finished work, switch to it, then bump. The targets refuse any other branch.
- The bump writes the new version to `Cargo.toml`, `Cargo.lock` and the Flatpak metainfo, amends that into the last commit and tags it `v<new>`. It refuses a dirty tree, a commit that is already tagged or pushed, and a version the changelog has no entry for.