@@ -13,6 +13,8 @@ echo " date_string::String"
1313echo " tagged_commit::Bool"
1414echo " fork_master_distance::Int"
1515echo " fork_master_timestamp::Float64"
16+ echo " build_system_commit::String"
17+ echo " build_system_commit_short::String"
1618echo " end"
1719echo " "
1820
@@ -82,6 +84,16 @@ if [ -z "$fork_master_timestamp" ]; then
8284 fork_master_timestamp=" 0"
8385fi
8486
87+ build_system_directory=" ../.buildkite"
88+ if [[ -d " ${build_system_directory} /.git" ]]; then
89+ build_system_commit=$( git -C " ${build_system_directory} " rev-parse HEAD)
90+ build_system_commit_short=$( git -C " ${build_system_directory} " rev-parse --short HEAD)
91+ else
92+ echo " Warning: The build system directory does not exist or is not a Git repo: ${build_system_directory} " >&2
93+ build_system_commit=" "
94+ build_system_commit_short=" "
95+ fi
96+
8597echo " const GIT_VERSION_INFO = GitVersionInfo("
8698echo " \" $commit \" ,"
8799echo " \" $commit_short \" ,"
@@ -90,5 +102,7 @@ echo " $build_number,"
90102echo " \" $date_string \" ,"
91103echo " $tagged_commit ,"
92104echo " $fork_master_distance ,"
93- echo " $fork_master_timestamp ."
105+ echo " $fork_master_timestamp .,"
106+ echo " \" $build_system_commit \" ,"
107+ echo " \" $build_system_commit_short \" ,"
94108echo " )"
0 commit comments