From 72fdafacd10548932acbf05ce579762c00de430c Mon Sep 17 00:00:00 2001 From: Joachim Mild Date: Tue, 24 Mar 2026 19:35:02 +0100 Subject: [PATCH] fix(ci): robustly locate deb bundle dir in PKGBUILD - 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` --- .github/workflows/release.yml | 1 - apps/desktop/src-tauri/PKGBUILD | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1f24a2..28d15e8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -309,7 +309,6 @@ jobs: # Inject version into PKGBUILD sed -i "s/pkgver=\${_PKGVER}/pkgver=${PKGVER}/" PKGBUILD - sed -i "s/\${_REALVER}/${VERSION}/" PKGBUILD # Use a Docker container to run makepkg since Ubuntu doesn't have it natively # Pre-install dependencies as root diff --git a/apps/desktop/src-tauri/PKGBUILD b/apps/desktop/src-tauri/PKGBUILD index 2b2acb2..0c3bc68 100644 --- a/apps/desktop/src-tauri/PKGBUILD +++ b/apps/desktop/src-tauri/PKGBUILD @@ -12,10 +12,11 @@ options=('!strip') package() { # The Tauri build for Debian creates a directory structure we can reuse. # In a Cargo workspace, we find the data directory within the workspace root's target folder. - _deb_bundle_dir=$(find ../../../target/release/bundle/deb -maxdepth 1 -type d -name "*${_REALVER}*" | head -n 1) + # 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) if [ -z "$_deb_bundle_dir" ]; then - echo "Error: Could not find Debian bundle directory for version ${_REALVER}" + echo "Error: Could not find any Debian bundle directory" echo "Searched in: ../../../target/release/bundle/deb" exit 1 fi