[build] Don't depend on the Git repo using --ref-format=files.

With the newer --ref-format=reftable, .git/logs/HEAD does not exist, so the version generation steps would always be considered dirty.

Cf. c7e58f832a

Change-Id: Id8735a739b751e4a54c2e4beecbef1eb23771c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/488600
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This commit is contained in:
Ryan Macnak
2026-03-24 15:36:36 -07:00
committed by Commit Queue
parent 8779faa131
commit 0a376fb28d
5 changed files with 13 additions and 32 deletions
+6
View File
@@ -57,3 +57,9 @@ aot_compile_using_prebuilt_sdk("gen_kernel.exe") {
output = "$root_out_dir/gen_kernel.exe"
package_config = "$_dart_root/.dart_tool/package_config.json"
}
# Does not write to the file if the content is unchanged.
generated_file("git_version") {
outputs = [ "$target_gen_dir/git_version" ]
contents = exec_script("../tools/make_version.py", [], "trim string")
}