How to set the version of Sidekicks
This guide shows how to change the version of Sidekicks before a release, and explains why one command is not enough. It assumes wails3 (see How to develop the application).
Steps
-
In
build/config.yml, setinfo.version(e.g."1.3.0"). -
Run:
scripts/sync-build-assets.shIt ends with
build assets are in sync with info.version 1.3.0 (LSMinimumSystemVersion 13.0.0). -
Review
git diff build/, then commit and push with the rest of the release. Writedocs/release-notes/v<version>.md(and.fr.md) too. -
Set
TAG="v<version>"in.release.env.
You can skip step 2: local-ci-02-build.sh runs the same script. But when it changes a tracked file it stops (the tag has to describe what was built), so you would commit and start it again. Doing step 2 yourself saves that round trip.
Why a script
The version of the application is written in several places, and only build/config.yml is edited by hand. The others are generated by wails3 task common:update:build-assets:
| File | Holds |
|---|---|
build/darwin/Info.plist, Info.dev.plist |
CFBundleShortVersionString, CFBundleVersion, LSMinimumSystemVersion |
build/windows/info.json, wails.exe.manifest, nsis/wails_tools.nsh |
the version of the Windows executable and installer |
build/linux/nfpm/nfpm.yaml |
the version of the Linux packages |
If they are not regenerated, the About box, the Finder and the Windows file properties show the previous version although the packages are named after the new one.
The generator has a flaw: it resets LSMinimumSystemVersion to 12.0.0. Sidekicks is built for macOS 13 or later (-mmacosx-version-min=13.0 in build/darwin/Taskfile.yml), so a release with 12.0.0 would let macOS 12 open an application that does not work there. scripts/sync-build-assets.sh runs the generator, puts 13.0.0 back in both plists and verifies the result (--check verifies without changing anything).
The generated files are tracked by git and the release tag points at HEAD: that is why they are committed, and why the local CI refuses to go on when the sync changes them.
Test releases
For a test tag (v9.9.9), the version is not changed: the packages keep the real info.version, and the sync finds nothing to do.
See also
- How to publish a release · RELEASING.md
- Reference: commands —
scripts/sync-build-assets.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
|