Commit 71ccdfd
authored
fix: SwiftBuddy app version permanently stuck at 1.0 (build 1) (#162)
* fix: SwiftBuddy app version permanently stuck at 1.0 (build 1)
generate_xcodeproj.py regenerates project.pbxproj fresh on every build
(it's gitignored, not a checked-in file), and MARKETING_VERSION/
CURRENT_PROJECT_VERSION were hardcoded literals in its template. Neither
release.yml (which releases roughly daily, tagged bNNN by commit count)
nor build-dmg.yml ever touched them, so every DMG and app bundle ever
built — regardless of commit or release tag — reported itself as
"SwiftBuddy 1.0" build "1". scripts/build_dmg.sh already reads the real
CFBundleShortVersionString out of the built app for the DMG filename, so
this was silently naming every DMG SwiftBuddy-macOS-v1.0.dmg too.
Makes both values overridable via env var (SWIFTBUDDY_MARKETING_VERSION,
SWIFTBUDDY_BUILD_NUMBER), defaulting to the previous hardcoded values
when unset so local/manual `python3 generate_xcodeproj.py` runs are
unaffected.
release.yml and build-dmg.yml now set:
- build number = `git rev-list --count HEAD`, the same counter release.yml
already uses for its bNNN release tags, so the app's build number and
its release tag always agree.
- marketing version = build date (YYYY.MM.DD) — always distinct per day,
no manual "when do we bump this" decision needed for a pipeline that
releases on close to a daily cadence.
build-dmg.yml's checkout also gained fetch-depth: 0 — needed for
`git rev-list --count HEAD` to see full history (it was a shallow clone;
release.yml already had this for the same reason).
Verified locally: `python3 generate_xcodeproj.py` with no env vars set
reproduces the exact previous hardcoded output (1.0/1); with
SWIFTBUDDY_MARKETING_VERSION/SWIFTBUDDY_BUILD_NUMBER set, both interpolate
correctly into the generated project.pbxproj.
* fix: release notes hardcode a DMG filename that no longer matches the actual file
Now that the DMG is versioned (SwiftBuddy-macOS-v<date>.dmg, from the
previous commit), the release notes' 'Download the attached
SwiftBuddy-macOS.dmg below!' line is wrong on every release — the
attached file's actual name now changes daily. The upload step itself
uses a glob (output/*.dmg) so the upload was never broken, only the
prose pointing at a specific filename. Matches the wording the Quick
Start section two lines down already uses ('Download the attached DMG
and open it') rather than trying to thread the shell-local
SWIFTBUDDY_MARKETING_VERSION value into a step that has no access to
it.1 parent 28344ee commit 71ccdfd
3 files changed
Lines changed: 39 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
24 | 30 | | |
25 | 31 | | |
26 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
143 | 154 | | |
144 | 155 | | |
145 | 156 | | |
| |||
187 | 198 | | |
188 | 199 | | |
189 | 200 | | |
190 | | - | |
| 201 | + | |
191 | 202 | | |
192 | 203 | | |
193 | 204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
7 | 21 | | |
8 | 22 | | |
9 | 23 | | |
| |||
12 | 26 | | |
13 | 27 | | |
14 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
15 | 32 | | |
16 | 33 | | |
17 | 34 | | |
| |||
343 | 360 | | |
344 | 361 | | |
345 | 362 | | |
346 | | - | |
| 363 | + | |
347 | 364 | | |
348 | 365 | | |
349 | 366 | | |
| |||
354 | 371 | | |
355 | 372 | | |
356 | 373 | | |
357 | | - | |
| 374 | + | |
358 | 375 | | |
359 | 376 | | |
360 | 377 | | |
| |||
371 | 388 | | |
372 | 389 | | |
373 | 390 | | |
374 | | - | |
| 391 | + | |
375 | 392 | | |
376 | 393 | | |
377 | 394 | | |
378 | 395 | | |
379 | | - | |
| 396 | + | |
380 | 397 | | |
381 | 398 | | |
382 | 399 | | |
| |||
0 commit comments