Skip to content

Commit 21c8626

Browse files
author
Thomas Desveaux
committed
package: write branch name to DNEEngineVersion
1 parent ef6aa3f commit 21c8626

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

nimp/base_commands/package.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,13 +602,24 @@ def _update_ini_file(
602602
DNE_ENGINE_VERSION_SECTION = '/Script/DNEEngineVersion.DNEEngineVersion'
603603
PROJECT_BINARY_VERSION_KEY = 'ProjectBinaryRevision'
604604
PROJECT_CONTENT_VERSION_KEY = 'ProjectContentRevision'
605+
PROJECT_BRANCH_NAME_KEY = 'ProjectBranchName'
605606

606607
write_dne_revisions = getattr(env, 'write_project_revisions', False)
607608

608609
if write_dne_revisions:
609610
if DNE_ENGINE_VERSION_SECTION not in ini_config:
610611
ini_config[DNE_ENGINE_VERSION_SECTION] = {}
611612

613+
if branch := getattr(env, 'branch'):
614+
if write_dne_revisions:
615+
logging.info(
616+
'Set [%s]%s to %s',
617+
DNE_ENGINE_VERSION_SECTION,
618+
PROJECT_BRANCH_NAME_KEY,
619+
branch,
620+
)
621+
ini_config[DNE_ENGINE_VERSION_SECTION][PROJECT_BRANCH_NAME_KEY] = branch
622+
612623
workspace_status = nimp.system.load_status(env)
613624
if isinstance(workspace_status, dict):
614625
worker_platform = nimp.unreal.get_host_platform()

0 commit comments

Comments
 (0)