Releasing
Audience: contributors. How a hotfpc release is made.
A release is a version tag. The release workflow builds the archives from it, checks their version against the tag and publishes them with the changelog's section as the notes.
Versions
Versions are MAJOR.MINOR.PATCH, and tags have no prefix: 1.1.0. The version lives in
HotFPCVersion in source/HotFPC.pas, and a unit test checks it, so the two change
together.
Changelog
CHANGELOG.md is written by hand, for people who use hotfpc: what each release changes in
what they see. Changes go under ## Unreleased as they are made. The release workflow takes
the notes from the section named after the tag and fails without one.
Cutting a release
-
In one pull request, rename
## Unreleasedto## <version>inCHANGELOG.md, and setHotFPCVersionand the version the unit test expects insource/HotFPC.pas(chore(release): <version>). -
Once it is merged, tag the merge commit and push the tag:
git tag <version> git push origin <version> -
.github/workflows/release.ymlbuildshotfpcwith fpc 3.2.2 and release settings (./build.sh clean hotfpc --production, andbuild.batwith-- -Twin64 -Px86_64on Windows) on GitHub's runners forlinux-x64,linux-arm64,macos-arm64,macos-x64andwindows-x64. It checks thathotfpc --versionprintshotfpc <tag>, packs each binary withREADME.mdandLICENSEintohotfpc-<version>-<system>.tar.gz(.zipfor Windows), writeshotfpc-<version>-checksums.txtwith their SHA-256 sums, and creates the GitHub release. -
Once the release is published, set its version in the download commands of the quick start with a pull request: the archive names and the source download carry it.
Homebrew
The formula hotfpc in frostney/homebrew-tap
installs the release binary. After a release, update Formula/hotfpc.rb there with a pull
request: each archive's URL and its SHA-256 from the checksum file. The formula has a
block for each of macos-arm64, macos-x64, linux-arm64 and linux-x64.