From b8ac2488fe16cdf9a99fc97f84a7e4148b8182c2 Mon Sep 17 00:00:00 2001 From: "j.foucher" Date: Fri, 1 May 2026 09:17:26 +0200 Subject: [PATCH] sign-manifest: derive ZIP filename from manifest URL, tolerant fallback MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously the script assumed every ZIP was named proserve-{version}.zip. That broke when an upload was named "Proserve v1.4.6.zip" (with space and capital P, the natural name produced by Compress-Archive on a Proserve v1.4.6/ folder). Now the script: 1. Reads download.url from each version entry, takes basename(). 2. If that exact file is missing, falls back to a glob *{version}*.zip in builds/ — succeeds if exactly one match. 3. Logs a clear message in either case. Also fix manifest example hostname (www.exemple-asterion.com → asterionvr.com). --- server/manifest/versions.json | 8 +++---- server/tools/sign-manifest.php | 42 ++++++++++++++++++++++++++-------- 2 files changed, 37 insertions(+), 13 deletions(-) diff --git a/server/manifest/versions.json b/server/manifest/versions.json index f2bcc06..c890d38 100644 --- a/server/manifest/versions.json +++ b/server/manifest/versions.json @@ -11,11 +11,11 @@ "executable": "PROSERVE_UE_5_5.exe", "installFolderTemplate": "Proserve v{version}", "download": { - "url": "https://www.exemple-asterion.com/PS_Launcher/builds/proserve-1.4.6.zip", + "url": "https://asterionvr.com/PS_Launcher/builds/proserve-1.4.6.zip", "sizeBytes": 0, "sha256": "REPLACE_AFTER_BUILD" }, - "releaseNotesUrl": "https://www.exemple-asterion.com/PS_Launcher/api/releasenotes/1.4.6", + "releaseNotesUrl": "https://asterionvr.com/PS_Launcher/api/releasenotes/1.4.6", "minLicenseDate": "2025-01-01", "availableForDownload": true }, @@ -25,11 +25,11 @@ "executable": "PROSERVE_UE_5_5.exe", "installFolderTemplate": "Proserve v{version}", "download": { - "url": "https://www.exemple-asterion.com/PS_Launcher/builds/proserve-1.4.5.zip", + "url": "https://asterionvr.com/PS_Launcher/builds/proserve-1.4.5.zip", "sizeBytes": 0, "sha256": "REPLACE_AFTER_BUILD" }, - "releaseNotesUrl": "https://www.exemple-asterion.com/PS_Launcher/api/releasenotes/1.4.5", + "releaseNotesUrl": "https://asterionvr.com/PS_Launcher/api/releasenotes/1.4.5", "minLicenseDate": "2024-06-01", "availableForDownload": true } diff --git a/server/tools/sign-manifest.php b/server/tools/sign-manifest.php index 823d040..5370e83 100644 --- a/server/tools/sign-manifest.php +++ b/server/tools/sign-manifest.php @@ -1,13 +1,14 @@ 1) { + echo " Plusieurs candidats : " . implode(', ', array_map('basename', $candidates)) . "\n"; + } + continue; + } + } + $size = filesize($zip); - echo " [hash] $version : $size octets..."; + echo " [hash] $version : " . basename($zip) . " ($size octets)..."; $sha = hash_file('sha256', $zip); echo " sha256={$sha}\n"; $v['download']['sizeBytes'] = $size; $v['download']['sha256'] = $sha; + $updated++; } unset($v); @@ -49,4 +73,4 @@ file_put_contents( $manifestPath, json_encode($manifest, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES) . "\n" ); -echo "Manifest mis à jour : $manifestPath\n"; +echo "Manifest mis à jour ({$updated} version(s)) : $manifestPath\n";