project.godot's API URLs already pointed at UAT (us3q.ranaze.com), but deployment_environment itself was still "development" - a leftover label that never matched the actual origin. Since the UAT-only feature gates (Dynamic Questions, CCS Cases, Flashcards) check for the literal "uat" value, running from the Godot editor/debugger hid all three even though it's UAT in every other respect. Set it to "uat" to match reality, and update the two places that sed-patch this value at build time (web/Dockerfile for the UAT/PRD web builds, tools/export_steam_release.sh for the Steam build) so they still match the source string they're replacing.
36 lines
1.4 KiB
Bash
36 lines
1.4 KiB
Bash
#!/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=\"uat\"|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})."
|