From bca31bd14214064e7645d34b9d16332046315e9b Mon Sep 17 00:00:00 2001 From: hz Date: Fri, 24 Jul 2026 23:32:48 -0500 Subject: [PATCH] Add a Steam release export script pointed at production project.godot stays checked in against UAT (us3q.ranaze.com) so the Godot editor/debugger keeps testing against UAT. This script patches a local copy to prd/s3q.ranaze.com just for the Windows Desktop export - the same swap web/Dockerfile already does for UAT vs PRD web builds - runs the export, then always restores the original file. Verified: after a run, `git diff project.godot` is clean and the exported .pck contains s3q.ranaze.com with no trace of us3q.ranaze.com. --- tools/export_steam_release.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tools/export_steam_release.sh diff --git a/tools/export_steam_release.sh b/tools/export_steam_release.sh new file mode 100644 index 0000000..edbe8eb --- /dev/null +++ b/tools/export_steam_release.sh @@ -0,0 +1,35 @@ +#!/usr/bin/env bash +# Exports the Windows Desktop build against production endpoints, for Steam +# release. project.godot stays checked in pointing at UAT (us3q.ranaze.com) +# so the Godot editor/debugger keeps hitting UAT - this script patches a +# local copy just for the export, the same way web/Dockerfile patches +# project.godot for the UAT/PRD web builds, then restores the original file +# even if the export fails. +set -euo pipefail + +REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +PROJECT_FILE="${REPO_ROOT}/project.godot" +BACKUP_FILE="${PROJECT_FILE}.steam-release.bak" +GODOT_BIN="${GODOT_BIN:-/z/Godot/Godot_v4.6.2-stable_win64_console.exe}" +OUTPUT_PATH="${1:-build/windows/RanaZe.exe}" + +cleanup() { + if [ -f "${BACKUP_FILE}" ]; then + mv -f "${BACKUP_FILE}" "${PROJECT_FILE}" + fi +} +trap cleanup EXIT + +cp "${PROJECT_FILE}" "${BACKUP_FILE}" + +BUILD_REVISION="$(git -C "${REPO_ROOT}" rev-parse HEAD)" +sed -i \ + -e "s|deployment_environment=\"development\"|deployment_environment=\"prd\"|" \ + -e "s|build_revision=\"development\"|build_revision=\"${BUILD_REVISION}\"|" \ + -e "s|https://us3q.ranaze.com|https://s3q.ranaze.com|g" \ + "${PROJECT_FILE}" + +mkdir -p "${REPO_ROOT}/$(dirname "${OUTPUT_PATH}")" +"${GODOT_BIN}" --headless --export-release "Windows Desktop" "${OUTPUT_PATH}" --path "${REPO_ROOT}" + +echo "Steam release build exported to ${OUTPUT_PATH} (production endpoints, revision ${BUILD_REVISION})."