Build stamp via assets/build_info.json (reliable: same path as the catalog)
checkpoint / checkpoint (push) Successful in 1m39s
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:
+12
-1
@@ -49,9 +49,20 @@ var _is_authenticating: bool = false
|
||||
|
||||
# ─── 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:
|
||||
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_font_size_override("font_size", 12)
|
||||
v.set_anchors_and_offsets_preset(Control.PRESET_BOTTOM_RIGHT)
|
||||
|
||||
Reference in New Issue
Block a user