- 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>
14 lines
551 B
Bash
Executable File
14 lines
551 B
Bash
Executable File
#!/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\""
|