feat(build): separate dev app identity from releases#15
Conversation
Debug builds need their own bundle identity so local development does not collide with the installed release app in TCC, defaults, or app support storage. Release builds keep the existing production identity and log path to avoid disrupting published installs. Signed-off-by: Kevin Cui <bh@bugs.cc>
Summary by CodeRabbitRelease Notes
WalkthroughThis PR introduces a configurable app variant system that generates separate 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
scripts/update-lab/update-lab.sh (1)
65-70:⚠️ Potential issue | 🟠 Major | 🏗️ Heavy liftStop command doesn't adapt to the variant being tested.
The
stopcommand early-exits before the plist-derived values are set (lines 78-80), so it uses the defaultEXECUTABLE_NAME("LockIME Dev") andBUNDLE_ID("com.oomol.LockIME.dev") from lines 21-23. If you test a Release build withCONFIG=Release, then runmake update-test-stop, the stop command will:
- Try to kill "LockIME Dev" instead of "LockIME" (no-op, wrong process)
- Clear defaults for "com.oomol.LockIME.dev" instead of "com.oomol.LockIME" (wrong bundle)
- Leave the Release app running with its defaults intact
Consider checking for
$LAB_DIR/run/*.appand deriving values from the run copy's Info.plist when it exists, falling back to defaults only when no run copy is present.🔧 Suggested fix to derive from run copy
if [[ "$SCENARIO" == "stop" ]]; then + # Derive from run copy if it exists, otherwise use defaults + if compgen -G "$LAB_DIR/run/*.app" > /dev/null; then + local run_copy="$(echo "$LAB_DIR/run"/*.app | head -n1)" + APP_NAME="$(basename "$run_copy" .app)" + BUNDLE_ID="$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "$run_copy/Contents/Info.plist" 2>/dev/null || echo "$BUNDLE_ID")" + EXECUTABLE_NAME="$(/usr/libexec/PlistBuddy -c "Print :CFBundleExecutable" "$run_copy/Contents/Info.plist" 2>/dev/null || echo "$EXECUTABLE_NAME")" + fi stop_lab rm -rf "$LAB_DIR/run" "$LAB_DIR/payload" "$SERVE_DIR" echo "[update-lab] stopped." exit 0 fi🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/update-lab/update-lab.sh` around lines 65 - 70, The stop path currently exits before plist-derived values are set, so update the stop logic (stop_lab and the early-exit block in the SCENARIO == "stop" branch) to first check for a run copy under $LAB_DIR/run/*.app; if a run bundle exists, read its Info.plist to override EXECUTABLE_NAME and BUNDLE_ID (falling back to the existing defaults only when no run copy is present), then proceed to kill the correct process and clear defaults; ensure the code that reads CFBundleExecutable/CFBundleIdentifier from the run copy’s Info.plist is used by stop_lab and the rm/cleanup steps so Release builds are handled correctly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@scripts/update-lab/update-lab.sh`:
- Around line 65-70: The stop path currently exits before plist-derived values
are set, so update the stop logic (stop_lab and the early-exit block in the
SCENARIO == "stop" branch) to first check for a run copy under
$LAB_DIR/run/*.app; if a run bundle exists, read its Info.plist to override
EXECUTABLE_NAME and BUNDLE_ID (falling back to the existing defaults only when
no run copy is present), then proceed to kill the correct process and clear
defaults; ensure the code that reads CFBundleExecutable/CFBundleIdentifier from
the run copy’s Info.plist is used by stop_lab and the rm/cleanup steps so
Release builds are handled correctly.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ae591d2c-606e-4ad2-a761-505aab4109da
📒 Files selected for processing (8)
MakefileSources/LockIME/Info.plistSources/LockIMEKit/Logging/LogStore.swiftTests/LockIMEKitTests/LogStoreTests.swiftdocs/RELEASING.mdproject.ymlscripts/update-lab/README.mdscripts/update-lab/update-lab.sh
Debug builds need their own bundle identity so local development does not collide with the installed release app in TCC, defaults, or app support storage. Release builds keep the existing production identity and log path to avoid disrupting published installs.