feat: Use release version and run number in app bundle#10
Merged
Conversation
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>
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>
There was a problem hiding this comment.
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 toScripts/build-release.shand use them forCFBundleShortVersionString/CFBundleVersion. - Update the GitHub Actions release workflow to pass the release tag version and
github.run_numberinto 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.
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>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Co-authored-by: GitButler <gitbutler@gitbutler.com>
There was a problem hiding this comment.
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 to1.0.0. Consider defaulting BUILD_NUMBER to0(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_NUMBERis 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 like0.2.42.1, which is not a valid CFBundle* version format (they expect 1–3 period-separated integers). Encoderun_attemptinto 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
major.minor(e.g.,v0.2→0.2) and passes run number as patch{major}.{minor}.{runNumber}(e.g.,0.2.42)v{major}.{minor}format — no.0patchTest plan
v0.3, verify bundle version is0.3.{runNumber}