fix(ci): robustly locate deb bundle dir in Arch PKGBUILD#72
Conversation
- 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`
There was a problem hiding this comment.
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
PKGBUILDto 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-relatedsedreplacement 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.
| # 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) |
There was a problem hiding this comment.
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.
| # 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) |
Fixes the recurring
Build Arch Linux packagefailure on beta tags.Debian sanitizes versions like
0.1.0-beta.14to0.1.0, breaking the strict**findcommand inPKGBUILD. This PR updates the build script to generically locate thedeboutput directory. Also cleans up an obsoletesedreplacement inrelease.yml.