Skip to content

Commit

Permalink
Disable manifest download for public build
Browse files Browse the repository at this point in the history
  • Loading branch information
Morb0 committed Oct 7, 2023
1 parent dfccc52 commit ea9bf2e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/publish-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions Tools/gen_build_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit ea9bf2e

Please sign in to comment.