feat(mvp): support semantic versioning (MVP Build major.minor.release) in HUD and menus
checkpoint / checkpoint (push) Successful in 6m12s
checkpoint / checkpoint (push) Successful in 6m12s
This commit is contained in:
+10
-1
@@ -766,6 +766,14 @@ static func _build_label() -> String:
|
||||
return "dev"
|
||||
var d = JSON.parse_string(f.get_as_text())
|
||||
if d is Dictionary:
|
||||
if d.has("build_label"):
|
||||
var c: String = str(d.get("commit", ""))
|
||||
if not c.is_empty():
|
||||
return "%s (%s)" % [d.get("build_label"), c]
|
||||
return str(d.get("build_label"))
|
||||
var v: String = str(d.get("version", ""))
|
||||
if not v.is_empty():
|
||||
return "MVP Build %s (%s)" % [v, d.get("commit", "?")]
|
||||
return "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
|
||||
return "dev"
|
||||
|
||||
@@ -775,7 +783,8 @@ func _show_build_stamp() -> void:
|
||||
layer.layer = 128
|
||||
add_child(layer)
|
||||
var lbl := Label.new()
|
||||
lbl.text = "build %s" % _build_label()
|
||||
var bl := _build_label()
|
||||
lbl.text = bl if bl.begins_with("MVP Build") or bl == "dev" else ("build %s" % bl)
|
||||
lbl.add_theme_color_override("font_color", Color(1, 1, 0.35, 1.0))
|
||||
lbl.add_theme_color_override("font_outline_color", Color(0, 0, 0, 1.0))
|
||||
lbl.add_theme_constant_override("outline_size", 6)
|
||||
|
||||
+10
-1
@@ -64,6 +64,14 @@ static func _build_label() -> String:
|
||||
return "dev"
|
||||
var d = JSON.parse_string(f.get_as_text())
|
||||
if d is Dictionary:
|
||||
if d.has("build_label"):
|
||||
var c: String = str(d.get("commit", ""))
|
||||
if not c.is_empty():
|
||||
return "%s (%s)" % [d.get("build_label"), c]
|
||||
return str(d.get("build_label"))
|
||||
var v: String = str(d.get("version", ""))
|
||||
if not v.is_empty():
|
||||
return "MVP Build %s (%s)" % [v, d.get("commit", "?")]
|
||||
return "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
|
||||
return "dev"
|
||||
|
||||
@@ -81,7 +89,8 @@ static func _update_fs_button(btn: Button) -> void:
|
||||
|
||||
func _ready() -> void:
|
||||
var v := Label.new()
|
||||
v.text = "build %s" % _build_label()
|
||||
var bl := _build_label()
|
||||
v.text = bl if bl.begins_with("MVP Build") or bl == "dev" else ("build %s" % bl)
|
||||
v.add_theme_color_override("font_color", Color(1, 1, 1, 0.7))
|
||||
v.add_theme_color_override("font_outline_color", Color(0, 0, 0, 0.85))
|
||||
v.add_theme_constant_override("outline_size", 4)
|
||||
|
||||
@@ -53,8 +53,14 @@ func _show_build_stamp() -> void:
|
||||
if f != null:
|
||||
var d = JSON.parse_string(f.get_as_text())
|
||||
if d is Dictionary:
|
||||
stamp = "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
|
||||
lbl.text = "build %s" % stamp
|
||||
if d.has("build_label"):
|
||||
var c: String = str(d.get("commit", ""))
|
||||
stamp = ("%s (%s)" % [d.get("build_label"), c]) if not c.is_empty() else str(d.get("build_label"))
|
||||
elif not str(d.get("version", "")).is_empty():
|
||||
stamp = "MVP Build %s (%s)" % [d.get("version"), d.get("commit", "?")]
|
||||
else:
|
||||
stamp = "%s %s" % [d.get("checkpoint", "?"), d.get("commit", "?")]
|
||||
lbl.text = stamp if stamp.begins_with("MVP Build") or stamp == "dev" else ("build %s" % stamp)
|
||||
lbl.add_theme_color_override("font_color", Color(1, 1, 0.35, 1.0))
|
||||
lbl.add_theme_color_override("font_outline_color", Color(0, 0, 0, 1.0))
|
||||
lbl.add_theme_constant_override("outline_size", 6)
|
||||
|
||||
Reference in New Issue
Block a user