Skip to content

feat: Use release version and run number in app bundle#10

Merged
GordonBeeming merged 7 commits into
mainfrom
gb/build-number
Apr 2, 2026
Merged

feat: Use release version and run number in app bundle#10
GordonBeeming merged 7 commits into
mainfrom
gb/build-number

Conversation

@GordonBeeming
Copy link
Copy Markdown
Owner

@GordonBeeming GordonBeeming commented Apr 2, 2026

Summary

  • Build script accepts version and run number arguments
  • CI strips tag to major.minor (e.g., v0.20.2) and passes run number as patch
  • Both CFBundleVersion and CFBundleShortVersionString set to {major}.{minor}.{runNumber} (e.g., 0.2.42)
  • Tags use v{major}.{minor} format — no .0 patch

Test plan

  • Create release with tag v0.3, verify bundle version is 0.3.{runNumber}
  • About window shows correct version in installed app
  • Dev builds still show fallback "1.0.0"

Build script now accepts version and build number args.
CFBundleShortVersionString = tag version (e.g., 0.2.0)
CFBundleVersion = version.runNumber (e.g., 0.2.0.42)

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
@GordonBeeming GordonBeeming marked this pull request as ready for review April 2, 2026 11:42
Copilot AI review requested due to automatic review settings April 2, 2026 11:42
GordonBeeming and others added 3 commits April 2, 2026 21:43
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
Tag v0.2.0 → VERSION=0.2 → bundle version 0.2.42

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
Tags are v{major}.{minor}, run number becomes the patch.
Tag v0.2 + run 42 → bundle version 0.2.42

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the macOS release pipeline so the built app bundle embeds the release tag version (user-facing) and a CI-derived build number (internal), ensuring the About window shows the installed build’s correct version.

Changes:

  • Add <version> and <build number> arguments to Scripts/build-release.sh and use them for CFBundleShortVersionString / CFBundleVersion.
  • Update the GitHub Actions release workflow to pass the release tag version and github.run_number into the build script.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
Scripts/build-release.sh Accepts version/build args and writes them into Info.plist bundle version fields.
.github/workflows/build.yml Extracts version from the release tag and passes version + run number to the release build script.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Scripts/build-release.sh Outdated
Comment thread Scripts/build-release.sh
Comment thread .github/workflows/build.yml Outdated
GordonBeeming and others added 2 commits April 2, 2026 21:47
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
- Update build-release.sh usage docs with new args
- Add version and build number validation with clear errors
- Include run_attempt in build number for unique reruns

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
Copilot AI review requested due to automatic review settings April 2, 2026 11:49
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: GitButler <gitbutler@gitbutler.com>
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

Comments suppressed due to low confidence (3)

Scripts/build-release.sh:45

  • The script now takes positional args for version/build number (APP_VERSION/BUILD_NUMBER), but the header Usage section still shows running the script without args. Please update the Usage/docs to include the new <version> <buildNumber> parameters, their defaults, and an example so local runs match CI behavior.
CLI_TARGET="InsomniaCLI"
# Name of the GUI executable target defined in Package.swift
GUI_TARGET="Insomnia"
# Architecture to build for (Apple Silicon)

Scripts/build-release.sh:45

  • Defaulting BUILD_NUMBER to "1" makes the no-arg fallback bundle version become 1.0.1, but the PR description/test plan indicates dev builds should fall back to 1.0.0. Consider defaulting BUILD_NUMBER to 0 (or updating the documented fallback) to keep the stated versioning consistent.
CLI_TARGET="InsomniaCLI"
# Name of the GUI executable target defined in Package.swift
GUI_TARGET="Insomnia"
# Architecture to build for (Apple Silicon)

Scripts/build-release.sh:166

  • BUILD_NUMBER is allowed to contain a dot (e.g., 42.1), and you concatenate it as ${APP_VERSION}.${BUILD_NUMBER} for both CFBundleVersion and CFBundleShortVersionString. That can produce a 4-component version like 0.2.42.1, which is not a valid CFBundle* version format (they expect 1–3 period-separated integers). Encode run_attempt into an integer patch/build value (or keep attempt out of CFBundleShortVersionString) and tighten validation accordingly.
<dict>
    <key>CFBundleIdentifier</key>
    <string>com.gordonbeeming.insomnia</string>
    <key>CFBundleName</key>

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .claude/skills/create-release.md
@GordonBeeming GordonBeeming merged commit bdf0504 into main Apr 2, 2026
2 checks passed
@GordonBeeming GordonBeeming deleted the gb/build-number branch April 2, 2026 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants