Skip to content

Fix linux packaging - #6

Merged
B87 merged 8 commits into
mainfrom
fix-linux-dist
Jan 18, 2026
Merged

B87 merged 8 commits into
mainfrom
fix-linux-dist

Conversation

@B87

@B87 B87 commented Jan 17, 2026 •

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • New Features
    • Linux AppImage is now the recommended/default distribution (tar.gz still available; env override exists).
  • Documentation
    • Expanded Linux install docs with AppImage and tar.gz workflows, dependency commands, and troubleshooting notes.
  • Enhancements
    • Installer auto-selects AppImage, verifies/installs runtime deps, improves install verification and icon generation.
  • Chores
    • CI and release flows updated to build, verify, checksum, and publish AppImage artifacts; added macOS darwin/amd64 build.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 17, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@B87 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 18 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 64c6faf and d133f20.

📒 Files selected for processing (2)
  • .github/workflows/release.yml
  • scripts/create-appimage.sh
📝 Walkthrough

Walkthrough

Adds first-class Linux AppImage support: new AppImage builder script and Taskfile task, CI and release steps to build/verify/upload AppImages, installer changes to prefer AppImage with dependency checks, icon generation updates, and README updates documenting AppImage and tar.gz installs.

Changes

Cohort / File(s) Summary
CI Workflows
​.github/workflows/ci.yml, ​.github/workflows/release.yml
Add Linux deps (imagemagick, wget, squashfs-tools, pkg-config), add CI step to verify AppImage creation, add AppImage build/upload/checksum in release workflow, add darwin/amd64 build matrix entry.
Build Task
Taskfile.yaml
New public task build:appimage (Linux-only) that runs ./scripts/create-appimage.sh {{.VERSION}}.
AppImage Builder Script
scripts/create-appimage.sh
New script: downloads/verifies linuxdeploy + GTK plugin, validates env and binary, prepares AppDir/desktop file/icon (creates placeholder via ImageMagick if missing), runs linuxdeploy to produce a versioned .AppImage, cleans up and reports output.
Installer Script
scripts/install.sh
Prefer AppImage on Linux with PUBSUB_GUI_USE_TARBALL=1 override; add check_linux_dependencies() and dependency-install hints; implement AppImage install flow (copy, chmod, symlink, verify); adjust tarball handling and messages.
Icon Generation
scripts/generate-icons.sh
Update PNG resizing to produce exact 512x512 squares, improve macOS ICNS generation with cleanup/diagnostics and @2x sizes, change Windows ICO flow to assemble from sized PNGs and remove temps.
Documentation
README.md
Expand Linux install section to recommend AppImage, add AppImage and tar.gz installation steps, include distro-specific dependency commands and compatibility notes, reorder steps and adjust examples.

Sequence Diagram(s)

sequenceDiagram
  participant CI as CI / Release workflow
  participant Script as scripts/create-appimage.sh
  participant Remote as Remote HTTP (linuxdeploy, plugins)
  participant LD as linuxdeploy (GTK plugin)
  participant FS as Filesystem / Artifacts

  CI->>Script: run ./scripts/create-appimage.sh <VERSION>
  Script->>Remote: download linuxdeploy & gtk-plugin
  Remote-->>Script: binaries
  Script->>Script: (optional) verify checksums, validate env & binary
  Script->>FS: prepare AppDir, desktop file, icon (use ImageMagick if needed)
  Script->>LD: invoke linuxdeploy with GTK plugin
  LD-->>Script: generated .AppImage
  Script->>FS: move/rename AppImage to output dir
  CI->>FS: collect AppImage artifact and generate checksums
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 I hopped through bytes and stitched the stream,

Downloaded tools, made icons gleam,
CI called, the AppImage danced,
A sealed .AppImage — take a chance!
Hop on in, the GUI beams.

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 70.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Fix linux packaging' is partially related to the changeset as it addresses Linux distribution issues, but it significantly understates the scope of changes which include AppImage creation infrastructure, CI/release workflow enhancements, documentation updates, and installation script improvements.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented Jan 17, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves Linux packaging by introducing AppImage as the recommended distribution format, alongside the existing tar.gz archives. The changes include:

  • AppImage Support: New scripts/create-appimage.sh script that creates self-contained AppImages with bundled dependencies (no runtime library installation required)
  • Enhanced Install Script: Updated scripts/install.sh to prefer AppImage by default on Linux, with automatic dependency detection and installation for tar.gz fallback
  • CI/CD Integration: Both CI and release workflows now build and verify AppImages, with comprehensive installation instructions in release notes
  • macOS Intel Build: Added missing darwin/amd64 target to release workflow for Intel Mac support
  • Documentation: README and release notes updated with clear guidance on AppImage vs tar.gz options and platform-specific installation steps

The AppImage approach significantly improves the Linux user experience by eliminating dependency management issues, while maintaining tar.gz as an alternative for users who prefer traditional packaging.

Confidence Score: 4/5

  • This PR is safe to merge with minimal risk
  • The PR introduces well-structured packaging improvements with proper error handling and validation. The new AppImage script uses pinned versions with SHA256 verification for security. The install script includes comprehensive dependency checking and user prompts. However, the score is 4 (not 5) because: (1) the linuxdeploy version reference should be verified to ensure the release tag exists, and (2) the CI test step doesn't verify the AppImage actually works, only that it's created
  • Verify that scripts/create-appimage.sh references a valid linuxdeploy release version

Important Files Changed

Filename Overview
.github/workflows/release.yml Added macOS amd64 build target, imagemagick dependency, AppImage creation step with fallback tar.gz, and comprehensive Linux installation instructions in release notes
scripts/create-appimage.sh New comprehensive script for creating Linux AppImage with pinned tool versions, SHA256 verification, placeholder icon generation, and proper error handling
scripts/install.sh Enhanced to prefer AppImage by default on Linux, added automatic dependency checking/installation for tar.gz, and AppImage-specific installation logic

Sequence Diagram

sequenceDiagram
    participant User
    participant CI as CI Workflow
    participant Release as Release Workflow
    participant Script as create-appimage.sh
    participant LinuxDeploy as linuxdeploy tool
    participant Installer as install.sh

    Note over User,Installer: CI Build Process
    CI->>CI: Install imagemagick
    CI->>CI: Build Linux binary
    CI->>Script: ./create-appimage.sh ci-test
    Script->>LinuxDeploy: Download & verify linuxdeploy
    Script->>LinuxDeploy: Download & verify GTK plugin
    Script->>Script: Create desktop file & icon
    Script->>LinuxDeploy: Build AppImage with GTK deps
    LinuxDeploy-->>Script: AppImage created
    Script-->>CI: Verification complete

    Note over User,Installer: Release Process
    Release->>Release: Install imagemagick
    Release->>Release: Build Linux binary (wails build)
    Release->>Script: ./create-appimage.sh $VERSION
    Script->>LinuxDeploy: Download & verify tools
    Script->>LinuxDeploy: Build AppImage
    LinuxDeploy-->>Script: AppImage ready
    Script-->>Release: pubsub-gui_linux_amd64_$VERSION.AppImage
    Release->>Release: Also create tar.gz (fallback)
    Release->>Release: Upload both to GitHub Release

    Note over User,Installer: User Installation
    User->>Installer: curl install.sh | bash
    Installer->>Installer: Detect platform (Linux)
    Installer->>Installer: Prefer AppImage over tar.gz
    Installer->>Installer: Download AppImage from GitHub
    Installer->>Installer: Verify checksum
    Installer->>Installer: Install to ~/.local/bin
    Installer->>Installer: Create symlink for CLI access
    Installer-->>User: Installation complete (no deps needed)
Loading

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@README.md`:
- Around line 52-60: Update the README text that currently claims the AppImage
has "No dependencies required" and "no additional installation required" to
explicitly state the runtime dependency on FUSE/libfuse2 (e.g., package names
like libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04). Locate the
bullet "AppImage (Recommended)" and the "Linux - AppImage (Recommended)" section
and replace the absolute "no dependencies" wording with a note that the AppImage
bundles application libraries but requires FUSE (libfuse.so.2) at runtime, and
optionally add a short install hint for common distros.

In `@scripts/create-appimage.sh`:
- Around line 232-238: The AppImage detection assigns GENERATED_APPIMAGE using a
compound command where head -1 only applies to the fallback, causing multiple
matches from the first ls to be returned; change the command so you always pick
a single file (e.g., pipe the first ls to head -1 for the Pub_Sub_GUI*.AppImage
branch or use a glob and select the first element), update the
GENERATED_APPIMAGE assignment accordingly (reference GENERATED_APPIMAGE and the
subsequent log_error/exit branch) so only one AppImage path is stored and
checked.
🧹 Nitpick comments (2)
scripts/create-appimage.sh (1)

59-59: Use single quotes for trap to avoid early expansion.

The trap command uses double quotes, which causes $WORK_DIR to expand immediately when the trap is set. While this works because WORK_DIR is already defined, using single quotes is more robust and avoids potential issues if the script structure changes.

♻️ Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT
+trap 'rm -rf "$WORK_DIR"' EXIT
scripts/install.sh (1)

500-501: Consistency: Use single quotes for trap.

Same issue as in create-appimage.sh — prefer single quotes for the trap command to avoid early variable expansion.

♻️ Proposed fix
-    trap "rm -rf '$tmp_dir'" EXIT
+    trap 'rm -rf "$tmp_dir"' EXIT

Comment thread README.md
Comment on lines +52 to +60
- **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required!
- **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below)

2. Extract the archive and run the `pubsub-gui` binary
2. **Linux - AppImage (Recommended):**
```bash
chmod +x pubsub-gui_linux_amd64_*.AppImage
./pubsub-gui_linux_amd64_*.AppImage
```
The AppImage bundles all dependencies - no additional installation required!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

AppImage FUSE libfuse2 requirements 2024 2025 official documentation

💡 Result:

Short answer: Official AppImage documentation (AppImageKit wiki and the AppImage docs) requires FUSE 2 — i.e., the libfuse.so.2 runtime (package name libfuse2 on Debian/Ubuntu). The docs include instructions for installing/using libfuse2 and note Ubuntu 24.04 renamed the package to libfuse2t64 (and related packaging issues have been reported). [1][2][3]

Sources

  • AppImageKit FUSE wiki (requirements, install notes, Ubuntu rename warning). [1]
  • AppImage official troubleshooting docs (FUSE 2.x required, install and fallback instructions). [2]
  • GitHub issue discussing libfuse2t64 removal/packaging problems on Ubuntu 24.04 (reported 2025). [3]

🏁 Script executed:

cat -n README.md | sed -n '45,70p'

Repository: B87/pubsub-gui

Length of output: 1447


AppImage "no dependencies" claim is misleading — FUSE/libfuse2 is a documented runtime requirement.

Official AppImageKit documentation requires FUSE 2 (libfuse.so.2) as a runtime dependency. Current package names are libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04. The README should acknowledge this instead of claiming "no dependencies required" or "no additional installation required."

✏️ Suggested README fix
-    - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required!
+    - **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - Bundles app dependencies (requires FUSE/libfuse2).
...
-  The AppImage bundles all dependencies - no additional installation required!
+  The AppImage bundles app dependencies. You may need to install FUSE/libfuse2 (libfuse2 on Debian/Ubuntu, libfuse2t64 on Ubuntu 24.04).
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - No dependencies required!
- **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below)
2. Extract the archive and run the `pubsub-gui` binary
2. **Linux - AppImage (Recommended):**
```bash
chmod +x pubsub-gui_linux_amd64_*.AppImage
./pubsub-gui_linux_amd64_*.AppImage
```
The AppImage bundles all dependencies - no additional installation required!
- **AppImage (Recommended)**: `pubsub-gui_linux_amd64_*.AppImage` - Bundles app dependencies (requires FUSE/libfuse2).
- **tar.gz**: `pubsub-gui_linux_amd64_*.tar.gz` - Requires runtime libraries (see below)
2. **Linux - AppImage (Recommended):**
🤖 Prompt for AI Agents
In `@README.md` around lines 52 - 60, Update the README text that currently claims
the AppImage has "No dependencies required" and "no additional installation
required" to explicitly state the runtime dependency on FUSE/libfuse2 (e.g.,
package names like libfuse2 on Debian/Ubuntu and libfuse2t64 on Ubuntu 24.04).
Locate the bullet "AppImage (Recommended)" and the "Linux - AppImage
(Recommended)" section and replace the absolute "no dependencies" wording with a
note that the AppImage bundles application libraries but requires FUSE
(libfuse.so.2) at runtime, and optionally add a short install hint for common
distros.

Comment thread scripts/create-appimage.sh Outdated
Comment on lines +232 to +238
# Find the generated AppImage (name varies based on desktop file)
GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1)

if [[ -z "$GENERATED_APPIMAGE" ]]; then
log_error "Error: AppImage was not created"
exit 1
fi

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Potential issue with AppImage detection logic.

The command structure has a subtle precedence issue. If multiple Pub_Sub_GUI*.AppImage files exist, the first ls will return all of them (no head -1 applied). The head -1 only applies to the fallback branch.

🔧 Proposed fix
-GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1)
+GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1)
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# Find the generated AppImage (name varies based on desktop file)
GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1)
if [[ -z "$GENERATED_APPIMAGE" ]]; then
log_error "Error: AppImage was not created"
exit 1
fi
# Find the generated AppImage (name varies based on desktop file)
GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1)
if [[ -z "$GENERATED_APPIMAGE" ]]; then
log_error "Error: AppImage was not created"
exit 1
fi
🤖 Prompt for AI Agents
In `@scripts/create-appimage.sh` around lines 232 - 238, The AppImage detection
assigns GENERATED_APPIMAGE using a compound command where head -1 only applies
to the fallback, causing multiple matches from the first ls to be returned;
change the command so you always pick a single file (e.g., pipe the first ls to
head -1 for the Pub_Sub_GUI*.AppImage branch or use a glob and select the first
element), update the GENERATED_APPIMAGE assignment accordingly (reference
GENERATED_APPIMAGE and the subsequent log_error/exit branch) so only one
AppImage path is stored and checked.

B87 added 4 commits January 18, 2026 01:04
…eate-appimage script

- Added wget to the list of dependencies in the CI workflow.
- Updated linuxdeploy version to 1-alpha-20251107-1 in create-appimage.sh.
- Improved error handling for wget commands to provide clearer error messages if downloads fail.
- Modified the script to attempt downloading the linuxdeploy checksum file, logging a warning if it is not available.
- Updated checksum verification logic to only proceed if the checksum file was successfully downloaded and SKIP_CHECKSUM is not set.
- Improved user feedback with success and warning messages during the checksum process.
- Updated the icon generation script to ensure all generated icons are exactly square by using the `-extent` option with ImageMagick.
- Removed obsolete icon files from the appicon.iconset directory, including various sizes (16x16, 32x32, 64x64, 128x128, 256x256, 512x512) and their @2x counterparts.
- Improved error handling during the ICNS file generation process to provide better feedback in case of failures.
- Copied the application icon to the working directory with the name expected by the desktop file, ensuring compatibility with linuxdeploy.
- Updated the icon file reference in the AppImage creation process to use the newly copied icon, improving the build process.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In `@scripts/generate-icons.sh`:
- Around line 29-32: The ImageMagick command in scripts/generate-icons.sh
incorrectly places -gravity after -extent so centering has no effect; update the
call that uses $IMAGEMAGICK_CMD with "$SVG_ICON" -background none -resize
512x512 -gravity center -extent 512x512 "$BUILD_DIR/appicon.png" so -gravity
center is specified before -extent (keep the same $SVG_ICON, $BUILD_DIR and
output appicon.png identifiers).
- Around line 64-79: The ImageMagick commands using the IMAGEMAGICK_CMD variable
to create PNGs from SVG_ICON have -extent after -gravity which prevents proper
centering; update each invocation that writes to files like
"$ICONSET_DIR/icon_512x512.png", "$ICONSET_DIR/icon_256x256@2x.png", etc., so
that the -gravity center option appears before -extent (i.e., move "-gravity
center" immediately before each corresponding "-extent <size>x<size>" for all
sizes and `@2x` variants) to ensure images are correctly centered.
♻️ Duplicate comments (1)
scripts/create-appimage.sh (1)

246-252: AppImage detection logic still has precedence issue.

The head -1 only applies to the fallback branch. If multiple Pub_Sub_GUI*.AppImage files exist, all would be assigned to GENERATED_APPIMAGE, which could cause the mv command on line 255 to fail.

🔧 Suggested fix
-GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 *.AppImage 2>/dev/null | head -1)
+GENERATED_APPIMAGE=$(ls -1 Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 *.AppImage 2>/dev/null | head -1)
🧹 Nitpick comments (1)
scripts/create-appimage.sh (1)

57-59: Consider using single quotes for the trap to defer variable expansion.

The current double-quoted trap expands $WORK_DIR when set rather than when triggered. While this works correctly here since WORK_DIR never changes, the idiomatic pattern uses single quotes to defer expansion, which also silences the shellcheck SC2064 warning.

🔧 Suggested fix
 WORK_DIR=$(mktemp -d)
-trap "rm -rf '$WORK_DIR'" EXIT
+trap 'rm -rf "$WORK_DIR"' EXIT

Comment thread scripts/generate-icons.sh Outdated
Comment thread scripts/generate-icons.sh Outdated
- Updated the create-appimage script to ensure the output directory is absolute and exists before creating the AppImage, improving reliability.
- Adjusted the handling of the generated AppImage name to only rename if it differs from the expected output name.
- Refined the icon generation script to maintain consistent usage of the `-extent` option with ImageMagick, ensuring all icons are generated correctly.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@scripts/create-appimage.sh`:
- Line 63: The trap currently expands $WORK_DIR immediately; change the trap to
use single quotes so the variable is expanded when the trap runs (e.g., replace
the existing trap invocation that references WORK_DIR with a single-quoted trap
command so $WORK_DIR is resolved at EXIT), ensuring you still quote the variable
inside the trapped command to handle spaces (refer to the trap command and
WORK_DIR).
♻️ Duplicate comments (1)
scripts/create-appimage.sh (1)

280-280: AppImage detection still has precedence issue with head -1.

The head -1 only applies to the fallback *.AppImage glob, not the primary Pub_Sub_GUI*.AppImage pattern. If multiple files match the first pattern, all will be assigned to GENERATED_APPIMAGE, causing issues in the subsequent mv command.

🔧 Proposed fix
-GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)
+GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)


# Working directory for downloads
WORK_DIR=$(mktemp -d)
trap "rm -rf '$WORK_DIR'" EXIT

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Use single quotes in trap to defer variable expansion.

The $WORK_DIR variable is expanded immediately when the trap is set, not when it's triggered. If WORK_DIR were ever reassigned later, the trap would still reference the old value. Use single quotes to defer expansion until the trap executes.

🔧 Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT
+trap 'rm -rf "$WORK_DIR"' EXIT
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
trap "rm -rf '$WORK_DIR'" EXIT
trap 'rm -rf "$WORK_DIR"' EXIT
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 63-63: Use single quotes, otherwise this expands now rather than when signalled.

(SC2064)

🤖 Prompt for AI Agents
In `@scripts/create-appimage.sh` at line 63, The trap currently expands $WORK_DIR
immediately; change the trap to use single quotes so the variable is expanded
when the trap runs (e.g., replace the existing trap invocation that references
WORK_DIR with a single-quoted trap command so $WORK_DIR is resolved at EXIT),
ensuring you still quote the variable inside the trapped command to handle
spaces (refer to the trap command and WORK_DIR).

- Added squashfs-tools to the list of dependencies in both CI and release workflows, ensuring all necessary tools are available for AppImage creation.
- Updated the create-appimage script documentation to reflect the new prerequisite for squashfs-tools, enhancing clarity for developers.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/release.yml (1)

122-158: Add Goreleaser step to the release workflow.

The workflow builds artifacts and packages them manually, but the repository has .goreleaser.yaml configured to handle builds, archives, checksums, and GitHub releases. Per the coding guidelines, add a Goreleaser step after the pre-build steps (frontend build, dependencies) complete. The existing custom packaging steps can be replaced with Goreleaser's built-in functionality.

🤖 Fix all issues with AI agents
In `@scripts/create-appimage.sh`:
- Around line 58-60: The script currently runs OUTPUT_DIR=$(cd "$OUTPUT_DIR" &&
pwd) before creating the directory, which will fail under set -e if OUTPUT_DIR
doesn't exist; change the order so you create the directory first (mkdir -p
"$OUTPUT_DIR") and then resolve the absolute path into OUTPUT_DIR using cd/pwd,
keeping the same variable names (OUTPUT_DIR) to avoid breaking downstream uses.
♻️ Duplicate comments (2)
scripts/create-appimage.sh (2)

64-64: Defer WORK_DIR expansion in the trap.

Double quotes expand immediately when setting the trap; use single quotes so $WORK_DIR resolves at EXIT.

🛠️ Proposed fix
-trap "rm -rf '$WORK_DIR'" EXIT
+trap 'rm -rf "$WORK_DIR"' EXIT

280-282: Ensure only one AppImage is selected.

head -1 applies only to the fallback branch, so the primary ls can return multiple files. Pipe both branches to head -1.

🛠️ Proposed fix
-GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)
+GENERATED_APPIMAGE=$(ls -1 "${OUTPUT_DIR}"/Pub_Sub_GUI*.AppImage 2>/dev/null | head -1 || ls -1 "${OUTPUT_DIR}"/*.AppImage 2>/dev/null | head -1)
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)

129-137: Avoid relying on the executable bit for create-appimage.sh.

If the file mode isn’t executable in the repo, this step fails. Either ensure the exec bit is set or invoke via bash to be safe.

🛠️ Proposed fix
-          ./scripts/create-appimage.sh "$VERSION"
+          bash ./scripts/create-appimage.sh "$VERSION"

Comment thread scripts/create-appimage.sh
- Added wget to the list of dependencies in the release workflow to ensure all necessary tools are available for AppImage creation.
- Updated the create-appimage script to improve directory handling, ensuring the output directory is writable and creating a temporary directory for AppImage processes.
- Adjusted the desktop file name in the script for consistency and improved error handling during the AppImage creation process.
@B87
B87 merged commit e4900c3 into main Jan 18, 2026
5 of 6 checks passed
@B87
B87 deleted the fix-linux-dist branch January 18, 2026 15:14
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.

1 participant