Commit Graph

5 Commits

Author SHA1 Message Date
Loko Kung 03ddfbb81f Wrap get_gitHash in try-catch to prevent failures in tarball builds.
Bug: chromium:1321370
Change-Id: If39d2236d1b4d965f7bd189f6bd1cdc70436c41d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/88582
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
2022-05-03 00:28:53 +00:00
Aleksi Sapon 4e1c65d030 Fix dawn_version_generator.py on Windows when not using depot_tools
Find git using shutil.which() so extensions are resolved according to PATHEXT.

Remove the "print(e)" that is breaking the expected output.

Bug: dawn:1383
Change-Id: If299b744add0797036598129e08ba7d8c64002e1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87481
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-04-21 21:35:26 +00:00
dan sinclair a12ddc6ec6 Updates to dawn_version_generator.
This CL fixes the incorrect `path` variable used when the HEAD lookup
fails, the proper path is now emitted.

The call to `get_gitResolvedHead` is wrapped in a try/except and an
exception is treated as if we are not in a git directory. This allows
the build to continue if `refs/head/main` doesn't exist in the local
check.

Change-Id: I49ae66cc5eac99d43387b58d28d356282b8f6783
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/87100
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
2022-04-19 19:27:08 +00:00
Loko Kung 24ae176d91 Fix commit build rule to use empty hash (and not throw error) if git is not available.
Bug: dawn:549
Change-Id: I75ab6eb0273ddcb2dc571d5c91d35422793fdffc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85745
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-04-05 20:11:43 +00:00
Loko Kung f57867264a Adds a generated file with the dawn git hash encoded at build time.
Bug: dawn:549
Change-Id: I5d6306f33b7ad2247ee75a0c5387a2bc6fac0497
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/83901
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-03-31 05:09:04 +00:00