From 0267fd2fefcee49cf331a758260727b62665c99e Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Mon, 17 Aug 2026 17:24:14 +0100 Subject: [PATCH] release.yml: check /src/ for .deb (not /src/_src/) for both builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The Makefile mv's the produced .deb into /src/ (POSTIT_OUT_DIR default = parent of build dir). The post-build 'ls' check was running in cwd /src/_src/, missing the .deb every time, which made the build step fail even when dpkg-deb had succeeded. Worse: amd64 step exited 1 first, so arm64 step never ran. The 'no arm64 .deb' symptom was a red herring — it was caused by this earlier amd64 false negative, not by an arm64 build failure. Fix: ls /src/postit_*...deb explicitly. If both builds succeed, we'll see both .deb in the next step. If only amd64 shows up, we'll know arm64 actually failed (and where, via set -x). --- .forgejo/workflows/release.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/.forgejo/workflows/release.yml b/.forgejo/workflows/release.yml index 05f1c1b..e25aa4f 100644 --- a/.forgejo/workflows/release.yml +++ b/.forgejo/workflows/release.yml @@ -222,45 +222,42 @@ jobs: env: POSTIT_RUNTIME: linux-x64 run: | - set -e -x + set -e TAG=$(jq -r '.tag' "$STATE_FILE") cd /src/_src echo "→ Building amd64 for POSTIT_GIT_TAG=$TAG" make deb POSTIT_GIT_TAG="$TAG" POSTIT_RUNTIME=linux-x64 - DEB_AMD64=$(ls postit_*${TAG}-1_amd64.deb 2>/dev/null || true) + # make deb mv's the produced .deb(s) into /src/ (the + # parent of /src/_src/, $POSTIT_OUT_DIR default). + # Check there, not in the build dir. + DEB_AMD64=$(ls /src/postit_*${TAG}-1_amd64.deb 2>/dev/null || true) if [[ -z "$DEB_AMD64" ]]; then - echo "::error::Build .deb amd64 did not produce postit_*${TAG}-1_amd64.deb" - ls -la + echo "::error::Build .deb amd64 did not produce /src/postit_*${TAG}-1_amd64.deb" + ls -la /src/ /src/_src/ 2>/dev/null exit 1 fi echo "✓ Built $DEB_AMD64" - set +x - name: Build .deb arm64 env: POSTIT_RUNTIME: linux-arm64 run: | - set -e -x + set -e TAG=$(jq -r '.tag' "$STATE_FILE") cd /src/_src echo "→ Building arm64 for POSTIT_GIT_TAG=$TAG" # Cross-RID .NET depuis un hôte amd64 : standard, pas # besoin de runner arm64 natif. make deb POSTIT_GIT_TAG="$TAG" POSTIT_RUNTIME=linux-arm64 - # Verify the arm64 .deb was actually produced. Without - # this check, a silent dpkg-buildpackage failure would - # let the step exit 0 (the Makefile's mv || true matches - # any leftover amd64 .deb and exits successfully), and - # the failure would only surface in the next step. - DEB_ARM64=$(ls postit_*${TAG}-1_arm64.deb 2>/dev/null || true) + # Same check as amd64: verify the .deb landed in /src/. + DEB_ARM64=$(ls /src/postit_*${TAG}-1_arm64.deb 2>/dev/null || true) if [[ -z "$DEB_ARM64" ]]; then - echo "::error::Build .deb arm64 did not produce postit_*${TAG}-1_arm64.deb" + echo "::error::Build .deb arm64 did not produce /src/postit_*${TAG}-1_arm64.deb" echo "Inspect the dpkg-buildpackage output above for the root cause." - ls -la + ls -la /src/ /src/_src/ 2>/dev/null exit 1 fi echo "✓ Built $DEB_ARM64" - set +x - name: Localiser les .deb produits run: |