Skip to content

Commit 248cc87

Browse files
committed
fix build version for latest build changes
supports more like vanilla build graph without many changes
1 parent 0c71b58 commit 248cc87

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

pbpy/pbunreal.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import configparser
22
import contextlib
3+
import datetime
34
import glob
45
import json
56
import os
@@ -1567,12 +1568,14 @@ def build_installed_build():
15671568
[pbgit.get_git_executable(), "-C", str(engine_path), "branch", "--show-current"]
15681569
)
15691570

1570-
branch_version = None
15711571
if "-main" in branch:
15721572
# reconstruct a versioned branch name
1573-
major = build_version["MajorVersion"]
1574-
minor = build_version["MinorVersion"]
1575-
branch_version = f"{major}.{minor}-{branch.split('-main')[0].upper()}"
1573+
depot = branch.split("-main", 1)[0].upper()
1574+
else:
1575+
depot = branch.split("-", 1)[1].upper()
1576+
major = build_version["MajorVersion"]
1577+
minor = build_version["MinorVersion"]
1578+
branch_version = f"{major}.{minor}-{depot}"
15761579
changelist = build_version["Changelist"] + 1
15771580
code_changelist = build_version["CompatibleChangelist"] + 1
15781581

@@ -1584,9 +1587,11 @@ def build_installed_build():
15841587
"CI": "1",
15851588
"uebp_CL": str(changelist),
15861589
"uebp_CodeCL": str(code_changelist),
1590+
"uebp_Depot": str(depot),
15871591
}
1588-
if branch_version:
1589-
env["uebp_BaseBranch"] = branch_version
1592+
today = datetime.date.fromtimestamp(datetime.time(tzinfo=datetime.timezone.utc))
1593+
date = today.strftime("%Y%m%d")
1594+
env["uebp_BuildRoot_P4"] = f"{branch_version}-{date}"
15901595

15911596
# build the installed engine
15921597
proc = pbtools.run_stream(

0 commit comments

Comments
 (0)