Skip to content

fix(ci): robustly locate deb bundle dir in Arch PKGBUILD#72

Merged
d0dg3r merged 1 commit intomainfrom
fix/arch-pkgbuild-find-version
Mar 24, 2026
Merged

fix(ci): robustly locate deb bundle dir in Arch PKGBUILD#72
d0dg3r merged 1 commit intomainfrom
fix/arch-pkgbuild-find-version

Conversation

@d0dg3r
Copy link
Owner

@d0dg3r d0dg3r commented Mar 24, 2026

Fixes the recurring Build Arch Linux package failure on beta tags.

Debian sanitizes versions like 0.1.0-beta.14 to 0.1.0, breaking the strict ** find command in PKGBUILD. This PR updates the build script to generically locate the deb output directory. Also cleans up an obsolete sed replacement in release.yml.

- Debian strips pre-release version tags (e.g. `beta.14`) when creating packages
- The strict `**` check failed for any pre-release bundles
- Changed `find` to safely pick the first directory in the `deb` artifact
- Removed obsolete `_REALVER` replacement from `release.yml`
Copilot AI review requested due to automatic review settings March 24, 2026 18:35
@d0dg3r d0dg3r merged commit b46390a into main Mar 24, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes the Arch Linux package build on beta tags by making the PKGBUILD locate the Debian bundle directory without relying on a version string that Tauri/DEB output may sanitize, and removes an obsolete workflow substitution.

Changes:

  • Update PKGBUILD to select the first DEB bundle directory found rather than matching *_REALVER*.
  • Improve the PKGBUILD error message when no DEB bundle directory is found.
  • Remove an obsolete _REALVER-related sed replacement from the release workflow.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
apps/desktop/src-tauri/PKGBUILD Makes DEB bundle directory discovery version-agnostic to avoid beta tag sanitization issues.
.github/workflows/release.yml Removes an unused/obsolete _REALVER substitution during PKGBUILD version injection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +15 to +16
# Tauri sanitizes versions (e.g., stripping pre-release tags for DEB), so we find the first dir.
_deb_bundle_dir=$(find ../../../target/release/bundle/deb -maxdepth 1 -mindepth 1 -type d | head -n 1)
Copy link

Copilot AI Mar 24, 2026

Choose a reason for hiding this comment

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

find ... | head -n 1 relies on find’s traversal order (not guaranteed) and scans the whole directory before head truncates. Consider using find ... -print -quit (and optionally sorting/filtering by ${pkgname}_* if multiple bundle dirs can exist) so the chosen DEB bundle dir is deterministic and cheaper to compute.

Suggested change
# Tauri sanitizes versions (e.g., stripping pre-release tags for DEB), so we find the first dir.
_deb_bundle_dir=$(find ../../../target/release/bundle/deb -maxdepth 1 -mindepth 1 -type d | head -n 1)
# Tauri sanitizes versions (e.g., stripping pre-release tags for DEB), so we find the first dir
# matching the package name pattern.
_deb_bundle_dir=$(find ../../../target/release/bundle/deb -maxdepth 1 -mindepth 1 -type d -name "${pkgname}_*" -print -quit)

Copilot uses AI. Check for mistakes.
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.

2 participants