feat(client): Version helper + sync-version script; project.godot config/version
- Add scripts/sync-version to sync root /VERSION into client/project.godot - Add Version GDScript helper (reads application/config/version) - Test coverage: 2 tests for Version.string() and footer() - Synced config/version="0.01-alpha" to project.godot Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
13
scripts/sync-version
Executable file
13
scripts/sync-version
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Sync the single source of truth (/VERSION) into the Godot client's project.godot
|
||||
# (application/config/version). Run after bumping /VERSION.
|
||||
set -euo pipefail
|
||||
root="$(cd "$(dirname "$0")/.." && pwd)"
|
||||
version="$(tr -d '[:space:]' < "$root/VERSION")"
|
||||
proj="$root/client/project.godot"
|
||||
if grep -q '^config/version=' "$proj"; then
|
||||
sed -i "s|^config/version=.*|config/version=\"$version\"|" "$proj"
|
||||
else
|
||||
sed -i "s|^\(config/name=.*\)|\1\nconfig/version=\"$version\"|" "$proj"
|
||||
fi
|
||||
echo "synced client config/version = \"$version\""
|
||||
Reference in New Issue
Block a user