diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2023-04-07 06:44:03 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-04-07 06:44:03 +0000 |
commit | 1da11870df436fb2cc6412cd7470a2ea75b9895b (patch) | |
tree | 0c089c4fa575a5712e85c80885135829114e6517 /ci | |
parent | 0e0db88c1878569d46c617b516052b1ec4f0e166 (diff) | |
parent | 4e19a149bf591782b328311c0f234d1e68430497 (diff) | |
download | bazel-1da11870df436fb2cc6412cd7470a2ea75b9895b.tar.gz |
Merge "Fix non-determinism of .tar.gz files"
Diffstat (limited to 'ci')
-rw-r--r-- | ci/build_with_bazel.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ci/build_with_bazel.sh b/ci/build_with_bazel.sh index 84d43f8d..b93a4b8f 100644 --- a/ci/build_with_bazel.sh +++ b/ci/build_with_bazel.sh @@ -51,7 +51,9 @@ function build_for_device() { # out/soong/bp2build. This is done early so it's available even if # builds/tests fail. Currently the generated BUILD files can be different # between products due to Soong plugins and non-deterministic codegeneration. - tar --mtime='1970-01-01' -czf "${DIST_DIR}/bp2build_generated_workspace_${product}.tar.gz" -C out/soong/bp2build . + # We tar and gzip in separate steps because when using tar -z, you can't tell it to not include + # a timestamp in the gzip header. + tar c --mtime='1970-01-01' -C out/soong/bp2build . | gzip -n > "${DIST_DIR}/bp2build_generated_workspace_${product}.tar.gz" local device_startup_flags=( # Unique output bases per product to help with incremental builds across |