-
-
Notifications
You must be signed in to change notification settings - Fork 1
fix: Mac DMG Release Build #49
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
Changes from 3 commits
04a3555
3e961d1
ada58bd
e895454
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -99,9 +99,9 @@ jobs: | |||||||||||||||||||||||||||||||||||
| mkdir -p assets | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
| if [ "$RUNNER_OS" = "macOS" ]; then | ||||||||||||||||||||||||||||||||||||
| if [ ! -f assets/photosort.icns ] || [ assets/app_icon.png -nt assets/photosort.icns ]; then | ||||||||||||||||||||||||||||||||||||
| mkdir -p build/icons/PhotoSort.iconset | ||||||||||||||||||||||||||||||||||||
| python - <<'PY' | ||||||||||||||||||||||||||||||||||||
| # Always regenerate .icns in CI for consistency | ||||||||||||||||||||||||||||||||||||
| mkdir -p build/icons/PhotoSort.iconset | ||||||||||||||||||||||||||||||||||||
| python - <<'PY' | ||||||||||||||||||||||||||||||||||||
| import os | ||||||||||||||||||||||||||||||||||||
| from PIL import Image | ||||||||||||||||||||||||||||||||||||
| base = Image.open('assets/app_icon.png') | ||||||||||||||||||||||||||||||||||||
|
|
@@ -119,17 +119,26 @@ jobs: | |||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||
| os.makedirs('build/icons/PhotoSort.iconset', exist_ok=True) | ||||||||||||||||||||||||||||||||||||
| for name, sz in sizes.items(): | ||||||||||||||||||||||||||||||||||||
| base.resize((sz, sz), Image.LANCZOS).save(os.path.join('build/icons/PhotoSort.iconset', name)) | ||||||||||||||||||||||||||||||||||||
| # Use modern Pillow API | ||||||||||||||||||||||||||||||||||||
| base.resize((sz, sz), Image.Resampling.LANCZOS).save(os.path.join('build/icons/PhotoSort.iconset', name)) | ||||||||||||||||||||||||||||||||||||
| PY | ||||||||||||||||||||||||||||||||||||
| iconutil -c icns build/icons/PhotoSort.iconset -o assets/photosort.icns | ||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||
| iconutil -c icns build/icons/PhotoSort.iconset -o assets/photosort.icns | ||||||||||||||||||||||||||||||||||||
| fi | ||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||
Copilot
AI
Oct 8, 2025
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.
Using || true to ignore all exit codes masks potential real failures. Consider checking for specific expected exit codes (like 2) instead of ignoring all failures.
| "$STAGING_DIR" \ | |
| || true # create-dmg exits with 2 on success sometimes | |
| "$STAGING_DIR" | |
| # create-dmg exits with 2 on success sometimes; fail for other codes | |
| status=$? | |
| if [ "$status" -ne 0 ] && [ "$status" -ne 2 ]; then | |
| echo "create-dmg failed with exit code $status" >&2 | |
| exit $status | |
| fi |
Copilot
AI
Oct 8, 2025
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.
Using || true to suppress exit codes can mask real failures. Consider checking the specific exit code (2) that indicates success instead of ignoring all errors.
| "$STAGING_DIR" \ | |
| || true # create-dmg exits with 2 on success sometimes | |
| "$STAGING_DIR" | |
| status=$? | |
| if [ "$status" -ne 0 ] && [ "$status" -ne 2 ]; then | |
| echo "create-dmg failed with exit code $status" >&2 | |
| exit $status | |
| fi |
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.
The 'fi' statement is orphaned after removing the conditional check. This will cause a shell syntax error.