@@ -13,6 +13,8 @@ echo " date_string::String"
13
13
echo " tagged_commit::Bool"
14
14
echo " fork_master_distance::Int"
15
15
echo " fork_master_timestamp::Float64"
16
+ echo " build_system_commit::String"
17
+ echo " build_system_commit_short::String"
16
18
echo " end"
17
19
echo " "
18
20
@@ -82,6 +84,16 @@ if [ -z "$fork_master_timestamp" ]; then
82
84
fork_master_timestamp=" 0"
83
85
fi
84
86
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
+
85
97
echo " const GIT_VERSION_INFO = GitVersionInfo("
86
98
echo " \" $commit \" ,"
87
99
echo " \" $commit_short \" ,"
@@ -90,5 +102,7 @@ echo " $build_number,"
90
102
echo " \" $date_string \" ,"
91
103
echo " $tagged_commit ,"
92
104
echo " $fork_master_distance ,"
93
- echo " $fork_master_timestamp ."
105
+ echo " $fork_master_timestamp .,"
106
+ echo " \" $build_system_commit \" ,"
107
+ echo " \" $build_system_commit_short \" ,"
94
108
echo " )"
0 commit comments