앱 빌드시 버전갱신 문제

This commit is contained in:
Macbook
2026-06-14 19:54:53 +09:00
parent ac2b0eb7f1
commit a6a3bfbe38
3 changed files with 60 additions and 11 deletions
+26 -2
View File
@@ -119,17 +119,41 @@ collect_updater_artifacts() {
done
}
copy_installer_matching_version() {
local kind="$1"
shift
local found=""
while IFS= read -r f; do
[[ -z "$f" ]] && continue
if [[ "$f" == *"${VERSION}"* ]]; then
found="$f"
break
fi
done < <("$@")
if [[ -z "$found" ]]; then
echo "ERROR: ${kind} installer for v${VERSION} not found (stale target cache ignored)." >&2
echo " Searched: $*" >&2
return 1
fi
cp -f "$found" "$ARTIFACT_DIR/"
echo " ${kind} installer: $(basename "$found")"
}
if [[ "$BUILD_MAC" -eq 1 ]]; then
echo "--- Tauri build (macOS) ---"
find "$TAURI_TARGET/release/bundle" -name '*.dmg' -delete 2>/dev/null || true
(cd "$DESKTOP_DIR" && npm run tauri:build:mac)
find "$TAURI_TARGET/release/bundle" -name '*.dmg' -exec cp -f {} "$ARTIFACT_DIR/" \; 2>/dev/null || true
copy_installer_matching_version "macOS" \
find "$TAURI_TARGET/release/bundle" -name '*.dmg' 2>/dev/null
collect_updater_artifacts
fi
if [[ "$BUILD_WIN" -eq 1 ]]; then
echo "--- Tauri build (Windows NSIS cross) ---"
find "$TAURI_TARGET" -path '*x86_64-pc-windows-msvc*' -name '*-setup.exe' -delete 2>/dev/null || true
(cd "$DESKTOP_DIR" && npm run tauri:build:win)
find "$TAURI_TARGET" -path '*x86_64-pc-windows-msvc*' -name '*-setup.exe' -exec cp -f {} "$ARTIFACT_DIR/" \; 2>/dev/null || true
copy_installer_matching_version "Windows" \
find "$TAURI_TARGET" -path '*x86_64-pc-windows-msvc*' -name '*-setup.exe' 2>/dev/null
collect_updater_artifacts
fi