Versions and release notes
Last updated
“Which Pila is the health centre running?” needs an answer in one word, and “what changed?” needs an answer people can read. In this lesson you'll number releases with semantic versioning, mark them with Git tags, keep a changelog, and write release notes for the two audiences who read them: developers, and Ate Cora at the counter.
By the end of this lesson you can
- Number releases with semantic versioning
- Keep a changelog and tag each release
- Write release notes for users that say what changed for them
Naming a release
Every release needs a name that says which one it is, so the team can say “the bug is in the version the health centre has, not in staging”, and so everyone knows what to expect from an upgrade. Most software uses numbers, and most of those follow one scheme.
Semantic versioning
Semantic versioning (semver), written down by Tom Preston-Werner, gives a version three numbers, MAJOR.MINOR.PATCH, and says when to raise each:
| Raise | When | Pila example |
|---|---|---|
| MAJOR | A change breaks something people or programs rely on | 1.4.2 → 2.0.0: the keyword changes from PILA to NUMERO |
| MINOR | Something new is added, and nothing breaks | 1.4.2 → 1.5.0: text CANCEL |
| PATCH | A fix, nothing new | 1.4.2 → 1.4.3: the screen no longer lags |
Raising one resets those after it: 1.4.2 plus a new feature is 1.5.0, not 1.5.2. Versions starting with 0, like 0.4.0, mean “still settling down: anything may change”. Pila goes to 1.0.0 at its first real release, in lesson 7.P.
The point is a promise. Someone who sees 1.4 → 1.5 knows they can upgrade without anything breaking. Seeing 2.0, they know to read the notes first.
Sort twelve changes
0 of 12 placed right
Fix: the screen sometimes showed the previous number
New: text CANCEL to give your number back
The keyword changes from PILA to NUMERO; PILA stops working
Fix: a typo in the sorry reply
New: the counter page can print the day’s list
The screen’s data feed returns times as text instead of numbers; the barangay’s display board stops reading it
New: a priority lane for seniors
Fix: a crash when a phone number had spaces
Faster database queries, nothing else different
Staff logins now need a second factor; old logins stop working until it’s set up
New: the reply says roughly how long the wait is
Fix: 17:00 gave out a number
A release usually holds several changes; it takes the biggest. A release with three fixes and one new feature is a MINOR.
Tags and changelogs
A tag marks the commit a release was built from, so the team can always get back to exactly what's running (Simple Git's Tags covers them):
git tag -a v1.1.0 -m "Pila 1.1.0" git push origin v1.1.0
A changelog is a file, usually CHANGELOG.md, listing each version's changes, newest first. Keep a Changelog, a widely used format, groups them under Added, Changed, Deprecated, Removed, Fixed and Security, and keeps an Unreleased section at the top that fills up as changes merge.
Commit messages can help write it. Conventional Commits, a common convention, starts each message with its kind, such as feat: or fix:, so a tool can gather them and even suggest the next version number (Simple Git's Commit conventions). The changelog is still written for people: one clear line per change, not a dump of commit messages.
Release notes for Ate Cora
A changelog is for developers. Release notes are for the people who use the software: what's different for them, and what, if anything, they must do. Here's the commit log for Pila 1.1.0:
e41c0a2 feat: CANCEL keyword frees the number 9b7d113 refactor: extract reply_for into replies.py 5c20f8e fix: screen missed updates sent close together 77aa301 feat: screen shows the next three numbers 1f0e9c4 test: regression test for screen updates 0c3b2d9 chore: bump pytest to 8.4
Write the release notes for Ate Cora and the counter staff.
- Gives the version number (not yet)
- Mentions cancelling (not yet)
- Mentions the screen (not yet)
- No commit jargon (feat:, refactor, PR #) (done)
- Mentions the screen falling behind (not yet)
- Says whether staff need to do anything (not yet)
- Says who to contact (not yet)
Half the commits don't appear in the notes at all. The refactor, the test and the pytest upgrade matter to developers, but change nothing at the counter.
Spot the trap: “bug fixes and improvements”
Pila 1.1.0 goes live. Its release notes say, in full: “Bug fixes and improvements.”
What happens if…
Check what you learned
Sources
Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.
- Semantic Versioning 2.0.0: the rules for MAJOR.MINOR.PATCH
- Keep a Changelog 1.1.0: a changelog format for people, not machines
- Conventional Commits 1.0.0: commit messages that tools can turn into a changelog
- Pro Git, 2.6: Tagging: marking a release in the history