From ea9bf2e14658f030e0d3e750af69fe4e650e3292 Mon Sep 17 00:00:00 2001 From: Morb0 <14136326+Morb0@users.noreply.github.com> Date: Sat, 7 Oct 2023 13:59:46 +0300 Subject: [PATCH] Disable manifest download for public build --- .github/workflows/publish-publish.yml | 1 + Tools/gen_build_info.py | 9 +++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/publish-publish.yml b/.github/workflows/publish-publish.yml index 264a012b34d..c606a98b008 100644 --- a/.github/workflows/publish-publish.yml +++ b/.github/workflows/publish-publish.yml @@ -41,6 +41,7 @@ jobs: - name: Update Build Info env: FORK_ID: {{ vars.FORK_ID_PUBLIC }} + DISABLE_MANIFEST: 1 # Use zip based download run: Tools/gen_build_info.py - name: Shuffle files around diff --git a/Tools/gen_build_info.py b/Tools/gen_build_info.py index 7a27e98e64e..453d52b9c9c 100755 --- a/Tools/gen_build_info.py +++ b/Tools/gen_build_info.py @@ -20,7 +20,8 @@ ] VERSION = os.environ['GITHUB_SHA'] -FORK_ID = os.environ.get('FORK_ID', "custom") +FORK_ID = os.getenv('FORK_ID', "custom") +DISABLE_MANIFEST = bool(os.getenv('DISABLE_MANIFEST', False)) BUILD_URL = f"https://builds.station14.ru/{{FORK_ID}}/builds/{{FORK_VERSION}}/{FILE}" MANIFEST_URL = f"https://cdn.station14.ru/{{FORK_ID}}/version/{{FORK_VERSION}}/manifest" MANIFEST_DOWNLOAD_URL = f"https://cdn.station14.ru/{{FORK_ID}}/version/{{FORK_VERSION}}/download" @@ -51,9 +52,9 @@ def generate_build_json(file: str) -> str: "version": VERSION, "fork_id": FORK_ID, "engine_version": engine_version, - "manifest_url": MANIFEST_URL, - "manifest_download_url": MANIFEST_DOWNLOAD_URL, - "manifest_hash": manifest_hash + "manifest_url": "" if DISABLE_MANIFEST else MANIFEST_URL, + "manifest_download_url": "" if DISABLE_MANIFEST else MANIFEST_DOWNLOAD_URL, + "manifest_hash": "" if DISABLE_MANIFEST else manifest_hash }) def generate_manifest_hash(file: str) -> str: