Build stamp via assets/build_info.json (reliable: same path as the catalog)
checkpoint / checkpoint (push) Successful in 1m39s

config/version didn't survive export cleanly. Instead checkpoint_ops writes
assets/build_info.json at build time (a plain JSON file, packed by the same
include_filter as the avatar catalog) and the menu + in-world HUD read it
with FileAccess. Shows 'build PC3 <commit>' so playtest reports say exactly
which build is running.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jtxAiu5dAW4WxCNdGkrkJ
This commit is contained in:
2026-09-06 00:41:57 +00:00
parent 3639fb3132
commit 44bfcb1871
3 changed files with 25 additions and 2 deletions
+1
View File
@@ -11,3 +11,4 @@ Thumbs.db
# Godot UID files (regenerated from path) # Godot UID files (regenerated from path)
*.uid *.uid
assets/build_info.json
+12 -1
View File
@@ -33,11 +33,22 @@ func _ready() -> void:
_setup_networked() _setup_networked()
static func _build_label() -> String:
var f := FileAccess.open("res://assets/build_info.json", FileAccess.READ)
if f == null:
return "dev"
var d = JSON.parse_string(f.get_as_text())
if d is Dictionary:
return "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
return "dev"
func _show_build_stamp() -> void: func _show_build_stamp() -> void:
var layer := CanvasLayer.new() var layer := CanvasLayer.new()
add_child(layer) add_child(layer)
var lbl := Label.new() var lbl := Label.new()
lbl.text = "build %s" % ProjectSettings.get_setting("application/config/version", "dev") lbl.text = "build %s" % _build_label()
lbl.add_theme_color_override("font_color", Color(1, 1, 1, 0.5)) lbl.add_theme_color_override("font_color", Color(1, 1, 1, 0.5))
lbl.add_theme_font_size_override("font_size", 13) lbl.add_theme_font_size_override("font_size", 13)
lbl.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_LEFT) lbl.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_LEFT)
+12 -1
View File
@@ -49,9 +49,20 @@ var _is_authenticating: bool = false
# ─── Lifecycle ──────────────────────────────────────────────────────────────── # ─── Lifecycle ────────────────────────────────────────────────────────────────
static func _build_label() -> String:
var f := FileAccess.open("res://assets/build_info.json", FileAccess.READ)
if f == null:
return "dev"
var d = JSON.parse_string(f.get_as_text())
if d is Dictionary:
return "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
return "dev"
func _ready() -> void: func _ready() -> void:
var v := Label.new() var v := Label.new()
v.text = "build %s" % ProjectSettings.get_setting("application/config/version", "dev") v.text = "build %s" % _build_label()
v.add_theme_color_override("font_color", Color(1, 1, 1, 0.4)) v.add_theme_color_override("font_color", Color(1, 1, 1, 0.4))
v.add_theme_font_size_override("font_size", 12) v.add_theme_font_size_override("font_size", 12)
v.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT) v.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT)