fix: clear stale bundles before building
This commit is contained in:
1 parent
9676c94430
commit
616afefed1
1 file changed
+9
-5
+9
-5
@@ -104,17 +104,21 @@ log "Clearing $ARTIFACTS"
|
|||||||
rm -rf "$ARTIFACTS"
|
rm -rf "$ARTIFACTS"
|
||||||
mkdir -p "$ARTIFACTS"
|
mkdir -p "$ARTIFACTS"
|
||||||
|
|
||||||
log "Building for $platform"
|
|
||||||
(cd "$WORKTREE" && pnpm --filter=@modrinth/app run tauri build "${tauri_args[@]}")
|
|
||||||
|
|
||||||
log "Collecting bundles into $ARTIFACTS"
|
|
||||||
|
|
||||||
if [ "$platform" = macos ]; then
|
if [ "$platform" = macos ]; then
|
||||||
bundle_dir="$WORKTREE/target/universal-apple-darwin/release/bundle"
|
bundle_dir="$WORKTREE/target/universal-apple-darwin/release/bundle"
|
||||||
else
|
else
|
||||||
bundle_dir="$WORKTREE/target/release/bundle"
|
bundle_dir="$WORKTREE/target/release/bundle"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Tauri leaves earlier bundles, and their signatures, where they were. A build
|
||||||
|
# without the key would otherwise ship an older build's signatures.
|
||||||
|
rm -rf "$bundle_dir"
|
||||||
|
|
||||||
|
log "Building for $platform"
|
||||||
|
(cd "$WORKTREE" && pnpm --filter=@modrinth/app run tauri build "${tauri_args[@]}")
|
||||||
|
|
||||||
|
log "Collecting bundles into $ARTIFACTS"
|
||||||
|
|
||||||
found=0
|
found=0
|
||||||
while IFS= read -r -d '' artifact; do
|
while IFS= read -r -d '' artifact; do
|
||||||
cp "$artifact" "$ARTIFACTS/"
|
cp "$artifact" "$ARTIFACTS/"
|
||||||
|
|||||||
Reference in new issue
Block a user