Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions apps/desktop/src-tauri/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Comment on lines +15 to +16
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.

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
Expand Down
Loading