From 87118698f7b7282e9452c58cfc05bed22c82cf19 Mon Sep 17 00:00:00 2001 From: Julian Kahnert Date: Thu, 3 Sep 2026 22:26:26 +0200 Subject: [PATCH 1/2] Rebuild the press kit archive from scratch `zip -r` adds to an archive that already exists rather than replacing it, and `Output/` survives a local build. A file removed from `presskit/` therefore stayed in `presskit.zip` indefinitely, so a locally built kit could ship assets that no longer exist in the repository. CI never showed this because its output folder starts empty, which is exactly what made the local archive able to drift from the deployed one unnoticed. --- Sources/PDFArchiverWebsite/PublishingSteps.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/PDFArchiverWebsite/PublishingSteps.swift b/Sources/PDFArchiverWebsite/PublishingSteps.swift index c95107fe..579d5efc 100644 --- a/Sources/PDFArchiverWebsite/PublishingSteps.swift +++ b/Sources/PDFArchiverWebsite/PublishingSteps.swift @@ -16,6 +16,10 @@ extension PublishingStep where Site == PDFArchiverWebsite { let root = try context.folder(at: "") let destination = try context.outputFolder(at: "").path + "presskit.zip" + // `zip` adds to an archive that already exists, and `Output/` survives a local build, + // so a file deleted from `presskit/` would otherwise stay in the kit forever. + try? FileManager.default.removeItem(atPath: destination) + let zip = Process() zip.executableURL = URL(fileURLWithPath: "/usr/bin/zip") // -X drops the resource forks and __MACOSX entries the Finder would add. From 7f7d7b45e71015be35eeeee29e7b5aad2759b4b1 Mon Sep 17 00:00:00 2001 From: Julian Kahnert Date: Thu, 3 Sep 2026 22:33:24 +0200 Subject: [PATCH 2/2] Keep .DS_Store out of the press kit It is git-ignored, so a fresh CI checkout never has one and the deployed archive was always clean. A local build zips whatever the folder holds, which is the same way the archive could drift from what ships. --- Sources/PDFArchiverWebsite/PublishingSteps.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/PDFArchiverWebsite/PublishingSteps.swift b/Sources/PDFArchiverWebsite/PublishingSteps.swift index 579d5efc..37c6fd3b 100644 --- a/Sources/PDFArchiverWebsite/PublishingSteps.swift +++ b/Sources/PDFArchiverWebsite/PublishingSteps.swift @@ -22,8 +22,9 @@ extension PublishingStep where Site == PDFArchiverWebsite { let zip = Process() zip.executableURL = URL(fileURLWithPath: "/usr/bin/zip") - // -X drops the resource forks and __MACOSX entries the Finder would add. - zip.arguments = ["-r", "-q", "-X", destination, "presskit"] + // -X drops the resource forks and __MACOSX entries the Finder would add; .DS_Store is + // git-ignored, so it only ever reaches the archive from a local build. + zip.arguments = ["-r", "-q", "-X", destination, "presskit", "-x", "*.DS_Store"] zip.currentDirectoryURL = URL(fileURLWithPath: root.path) try zip.run()