Skip to content

fix(installer): derive macOS pkg version from ui/package.json#57

Open
Relevant47 wants to merge 1 commit into
mainfrom
fix/issue-56-pkg-version-from-package-json
Open

fix(installer): derive macOS pkg version from ui/package.json#57
Relevant47 wants to merge 1 commit into
mainfrom
fix/issue-56-pkg-version-from-package-json

Conversation

@Relevant47
Copy link
Copy Markdown
Owner

Summary

installer/macos/build-pkg.sh hardcoded VERSION="1.0.0", so every manual macOS PKG was named FocusLock-1.0.0.pkg and recorded version: 1.0.0 in pkgutil --pkg-info com.focuslock.daemon regardless of the actual release. Now derived from ui/package.json (single source of truth per CLAUDE.md), with an optional positional override (./build-pkg.sh 1.2.3) for the rare case a builder needs to stamp a different version.

Files changed

  • installer/macos/build-pkg.sh — replace hardcoded VERSION="1.0.0" with ${1:-$(node -p "require('$REPO_ROOT/ui/package.json').version")}; reorder so SCRIPT_DIR/REPO_ROOT are computed before VERSION. Updated header comment.

Smoke-tested locally — the default expression reads 1.1.4 from the current ui/package.json; passing 1.9.9 as $1 overrides to that value.

Fixes #56

Risk tier

Trivial / single-file → normal PR, ready for review.

  • Off-pipeline manual script (the release workflow doesn't call it — issue body confirms).
  • node is already a hard dependency for building ui/, which the script's preconditions already assume (it checks $UI_APP exists from npm run tauri build).
  • Behavior on the default path is now correct-by-construction; the only observable change is the resulting filename + pkgutil metadata match the real release.

Option NOT taken

The issue suggests a follow-up to wire build-pkg.sh into release.yml. That's intentionally out of scope here — separate workflow change, separate review.

🤖 Generated with Claude Code


Generated by Claude Code

The build script hardcoded VERSION="1.0.0", so every manual macOS PKG
produced FocusLock-1.0.0.pkg with stale pkgutil metadata regardless of
the actual release version.

Fixes #56
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for focuslock-app ready!

Name Link
🔨 Latest commit 4fbdd97
🔍 Latest deploy log https://app.netlify.com/projects/focuslock-app/deploys/6a1f8c989bfd230008ea49d6
😎 Deploy Preview https://deploy-preview-57--focuslock-app.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
focus-lock Ready Ready Preview, Comment Jun 3, 2026 2:08am

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.

installer/macos/build-pkg.sh hardcodes VERSION="1.0.0" — every manual macOS PKG build produces wrong package name and metadata

2 participants