-
Notifications
You must be signed in to change notification settings - Fork 86
Packaging #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Packaging #68
Conversation
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughIntroduces macOS package installer support by adding a PackageMaker project configuration file and updating the CI build script to generate a universal macOS binary and invoke the package build tool during the post-build phase. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
ci-build-all.sh (1)
1-1: POSIX sh incompatibility:[[ ]]is undefined in/bin/sh.The shebang declares POSIX
sh, but line 11 uses[[ true ]]which is a Bash-specific construct. This will fail on systems where/bin/shis not Bash (e.g., Dash on Ubuntu/Debian).Either change the shebang to
#!/bin/bashor use POSIX-compatible syntax.🔧 Option 1: Use bash shebang
-#!/bin/sh +#!/bin/bash🔧 Option 2: Use POSIX-compatible test
-if [[ true ]]; then +if true; thenAlso applies to: 11-11
🧹 Nitpick comments (4)
ci-build-all.sh (2)
11-11: Placeholder conditionif [[ true ]]should be replaced with meaningful logic.This always-true condition appears to be a WIP placeholder. Consider gating this block on appropriate conditions such as:
- Running on macOS (
[[ "$OSTYPE" == "darwin"* ]])- The
packagesbuildtool being available (command -v packagesbuild)♻️ Suggested conditional
-if [[ true ]]; then +if [[ "$OSTYPE" == darwin* ]] && command -v packagesbuild &>/dev/null; then
12-21: Consider adding error handling for CI reliability.The packaging block lacks error handling. If
lipoorpackagesbuildfails, the script continues silently. For CI, consider:
- Adding
set -eat the top to fail fast- Using a trap to ensure cleanup on failure
♻️ Optional: Add error handling
#!/bin/bash +set -e + +cleanup() { + rm -rf ./ref +} +trap cleanup EXIT + GOOS=linux GOARCH=amd64 ./build.sh -o bbctl-linux-amd64Then remove the explicit
rm -r ./refat the end since the trap handles cleanup.bbctl.pkgproj (2)
793-794: Hardcoded version0.13.0should be automated.The TODO in
ci-build-all.shmentions usingsedto inject the version. This hardcoded value will drift from actual releases if not automated.Consider using
sedorplutilin the CI script to update this value dynamically from a version source (e.g., git tag, version file).♻️ Example version injection in ci-build-all.sh
# Before running packagesbuild, inject version: VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "0.0.0") sed -i.bak "s|<string>0.13.0</string><!-- VERSION -->|<string>${VERSION}</string><!-- VERSION -->|" ./bbctl.pkgprojOr use
plutilfor safer XML manipulation:plutil -replace PROJECT.PACKAGE_SETTINGS.VERSION -string "$VERSION" ./bbctl.pkgproj
13-726: Large template boilerplate in directory hierarchy.This extensive hierarchy (Applications, Library subdirs, System, Users, etc.) appears to be default template content from Packages.app. For a CLI tool installed to
/usr/local/bin, most of these empty directory definitions are unnecessary.This is low priority—the package will function correctly—but trimming unused entries would improve maintainability.
(Sorry this got created as an empty PR by VS Code.)
This is a WIP for using WhiteBox Packages to create an installer package for the macOS versions of Beeper Bridge Manager.
I have the following todos:
sedto set package version inpkgprojXMLI don't know if or when I'll finish this, since there are some other things I would like to experiment with, so if I don't do anything with this PR feel free to close it.
(Also feel free to build on this... but also feel free not to.)