File tree Expand file tree Collapse file tree 4 files changed +32
-7
lines changed
Expand file tree Collapse file tree 4 files changed +32
-7
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
77### Changed
88- Release scripts now use shared ` config.sh ` for app name and paths
99- ` just release ` no longer waits for notarization (async workflow)
10+ - Version and build number now auto-derived from git tag and commit count
1011
1112## [ v0.0.8] - 2026-01-07
1213
Original file line number Diff line number Diff line change @@ -205,13 +205,15 @@ Both require the private key to be present.
205205
206206Before releasing a new version:
207207
208- 1 . [ ] Update version in Xcode (both targets)
209- 2 . [ ] Update ` CHANGELOG.md `
210- 3 . [ ] Create git tag: ` git tag v0.0.X `
211- 4 . [ ] Push tag: ` git push origin v0.0.X `
212- 5 . [ ] Build releases:
208+ 1 . [ ] Update ` CHANGELOG.md `
209+ 2 . [ ] Create git tag: ` git tag v0.0.X `
210+ 3 . [ ] Push tag: ` git push origin v0.0.X `
211+ 4 . [ ] Build releases:
213212 - [ ] ` just release v0.0.X ` (direct)
214213 - [ ] ` just dmg v0.0.X ` (optional DMG installer)
215214 - [ ] ` just release-appstore v0.0.X ` (App Store)
216- 6 . [ ] Create GitHub release with ` .zip ` (and optionally ` .dmg ` )
217- 7 . [ ] Submit App Store version in App Store Connect
215+ 5 . [ ] Create GitHub release with ` .zip ` (and optionally ` .dmg ` )
216+ 6 . [ ] Submit App Store version in App Store Connect
217+
218+ > ** Note:** Version and build number are automatically set from the git tag.
219+ > ` v0.0.8 ` → MARKETING_VERSION=0.0.8, BUILD=(commit count)
Original file line number Diff line number Diff line change @@ -37,6 +37,17 @@ trap cleanup EXIT
3737
3838echo " Building for App Store: $ver "
3939
40+ # Derive marketing version and build number from git
41+ marketing_version=" ${ver# v} " # v0.0.8 → 0.0.8
42+ build_number=$( git rev-list --count HEAD)
43+
44+ echo " Setting MARKETING_VERSION=$marketing_version , BUILD=$build_number "
45+
46+ # Update Xcode project with version info
47+ project_file=" $PROJECT /project.pbxproj"
48+ sed -i ' ' " s/MARKETING_VERSION = [^;]*;/MARKETING_VERSION = $marketing_version ;/g" " $project_file "
49+ sed -i ' ' " s/CURRENT_PROJECT_VERSION = [^;]*;/CURRENT_PROJECT_VERSION = $build_number ;/g" " $project_file "
50+
4051ver_dir=" $BUILD_DIR /$ver -appstore"
4152archive_path=" $ver_dir /CacheStatus.xcarchive"
4253export_path=" $ver_dir /export"
Original file line number Diff line number Diff line change @@ -38,6 +38,17 @@ trap cleanup EXIT
3838
3939echo " Building version: $ver "
4040
41+ # Derive marketing version and build number from git
42+ marketing_version=" ${ver# v} " # v0.0.8 → 0.0.8
43+ build_number=$( git rev-list --count HEAD)
44+
45+ echo " Setting MARKETING_VERSION=$marketing_version , BUILD=$build_number "
46+
47+ # Update Xcode project with version info
48+ project_file=" $PROJECT /project.pbxproj"
49+ sed -i ' ' " s/MARKETING_VERSION = [^;]*;/MARKETING_VERSION = $marketing_version ;/g" " $project_file "
50+ sed -i ' ' " s/CURRENT_PROJECT_VERSION = [^;]*;/CURRENT_PROJECT_VERSION = $build_number ;/g" " $project_file "
51+
4152ver_dir=" $BUILD_DIR /$ver "
4253archive_path=" $ver_dir /CacheStatus.xcarchive"
4354export_path=" $ver_dir /export"
You can’t perform that action at this time.
0 commit comments