June 2025. Project in production. Need releases.
Could just git tag and done. But wanted more: changelog, versions, rollback if something breaks.
First version
Bash script. create-release.sh.
#!/bin/bash
VERSION=$1
git tag -a "v$VERSION" -m "Release $VERSION"
# copy files to releases/
# generate changelog
Worked. But inconvenient. Doesn't catch errors. Changelog by hand.
What it can do
- Creates tag
- Copies snapshot to releases/v1.2.3/
- Generates CHANGELOG.md from commits
- Checks that tests passed
- Won't release with uncommitted changes
Why snapshot
If something broke - rollback to previous release. Don't search git history, just take the folder.
Takes space? Yes. But disk is cheaper than time to rollback.
Versioning
Semver. MAJOR.MINOR.PATCH.
- PATCH: bugs, small fixes
- MINOR: new features, backward compatible
- MAJOR: breaking changes
Still in 0.x.x. First major release when I'm confident in the API.