From ec393c7f85fda257a5123169dc5c18058fdda244 Mon Sep 17 00:00:00 2001 From: Scott Reimers Date: Thu, 14 May 2026 21:12:51 -0600 Subject: [PATCH] fix(deploy): serialize CLI/APK/AppImage builds to avoid cargo target contention The v0.7.0 release surfaced a real bug: parallel cargo invocations all writing to target/ caused linuxdeploy to fail mid-AppImage bundle ("Error failed to bundle project failed to run linuxdeploy"). Cargo's own target-dir locking doesn't fully serialize three concurrent cargo-front-ends across CLI + Android-cross-compile + tauri-bundle. Solo cargo tauri build succeeded immediately after deploy.sh aborted, confirming the parallel invocation was the root cause. Switching to serial builds. The extra wall time is small because cargo's incremental cache deduplicates compilation of the shared itsgoin-core crate across the three builds. Co-Authored-By: Claude Opus 4.7 (1M context) --- deploy.sh | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/deploy.sh b/deploy.sh index c780395..f89cdca 100755 --- a/deploy.sh +++ b/deploy.sh @@ -21,23 +21,20 @@ KS_ALIAS="itsgoin" VERSION=$(grep '"version"' crates/tauri-app/tauri.conf.json | head -1 | sed 's/.*"\([0-9.]*\)".*/\1/') echo "=== Deploying v${VERSION} ===" -# Build CLI -echo "=== Building CLI ===" -cargo build -p itsgoin-cli --release & -CLI_PID=$! +# Builds run SERIALLY — parallel cargo invocations write to the same +# target/ directory, which causes intermittent failures (linuxdeploy +# blowing up mid-AppImage was the v0.7.0 release symptom). The extra +# wall time vs. the parallel version is small because cargo's +# incremental cache deduplicates the shared core crate compilation. -# Build APK -echo "=== Building APK ===" -cargo tauri android build --apk & -APK_PID=$! - -# Build AppImage (includes GStreamer patch) -echo "=== Building AppImage ===" +echo "=== Building AppImage (includes GStreamer patch) ===" ./build-appimage.sh -wait $CLI_PID -echo "=== CLI build complete ===" -wait $APK_PID -echo "=== APK build complete ===" + +echo "=== Building APK ===" +cargo tauri android build --apk + +echo "=== Building CLI ===" +cargo build -p itsgoin-cli --release # Sign APK echo "=== Signing APK ==="