From d095e1f410bd5c262afbf6b9cbc439c330d8d42c Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Fri, 21 Aug 2026 13:34:20 +0200 Subject: [PATCH] fix(ci): drop the bash-only shopt from the Linux artifact step "Prepare Linux artifacts" ran `shopt -s nullglob`, but the runner executes `run:` blocks with POSIX sh, where shopt does not exist. It exited 127 and failed the step -- so build-linux never uploaded, create-release (which needs all three build jobs) never ran, and v0.9.0 and v0.9.1 both compiled successfully but published nothing. The last release with assets is v0.8.2. Reproduced under busybox sh: the current block prints "shopt: not found", passes the unmatched rpm glob through literally ("cp: can't stat '.../bundle/rpm/*.rpm'"), and exits 127. Without nullglob an unmatched pattern stays literal, so test each candidate with [ -e ] instead; the same input then exits 0 with the AppImage and deb copied. traceability-check.yml already carries this rule in two places (`case` instead of `[[ == ]]`, a pipe instead of a here-string). Keeping the fix POSIX rather than adding `shell: bash` follows that convention and drops the dependency on bash being present in the builder image. --- .gitea/workflows/build-release.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/build-release.yml b/.gitea/workflows/build-release.yml index ab306152..95d2d1c1 100644 --- a/.gitea/workflows/build-release.yml +++ b/.gitea/workflows/build-release.yml @@ -154,14 +154,19 @@ jobs: # # `if [ -f "dir/"*.ext ]` was also wrong on its own terms: with more # than one match `test` gets extra arguments and fails. - shopt -s nullglob + # + # No `shopt -s nullglob` here: the runner executes `run:` blocks with + # POSIX sh, where shopt does not exist -- it exited 127 and killed the + # step (which is why v0.9.0 and v0.9.1 built but never published). + # Without nullglob an unmatched pattern stays literal, so test each + # candidate instead. Same POSIX-only rule as traceability-check.yml. for bundle in \ src-tauri/target/release/bundle/appimage/*.AppImage \ src-tauri/target/release/bundle/deb/*.deb \ src-tauri/target/release/bundle/rpm/*.rpm; do + [ -e "$bundle" ] || continue cp -v "$bundle" dist/linux/ done - shopt -u nullglob # A release with no Linux package is a failure, not a quiet success. if [ -z "$(ls -A dist/linux/)" ]; then