diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml index 32a1bc21..a2c6845d 100644 --- a/.github/workflows/presubmit.yml +++ b/.github/workflows/presubmit.yml @@ -41,7 +41,12 @@ jobs: - name: List git tag run: | + echo Git tag: git describe --tags --dirty + echo Git branch: + git symbolic-ref --short HEAD + echo Git commit: + git log -1 --format="%H" - name: Validate XML run: | diff --git a/Makefile b/Makefile index 22477173..c2e00d07 100644 --- a/Makefile +++ b/Makefile @@ -73,8 +73,8 @@ SPECREVISION = $(shell echo `git describe --tags --dirty`) # This used to be a dependency in the spec html/pdf targets, # but that's likely to lead to merge conflicts. Just regenerate # when pushing a new spec for review to the sandbox. -SPECREMARK = from git branch: $(shell echo `git symbolic-ref --short HEAD`) \ - commit: $(shell echo `git log -1 --format="%H"`) +SPECREMARK = from git branch: $(shell echo `git symbolic-ref --short HEAD 2> /dev/null || echo Git branch not available`) \ + commit: $(shell echo `git log -1 --format="%H" 2> /dev/null || echo Git commit not available`) endif # The C++ for OpenCL document revision scheme is aligned with its release date. # Revision naming scheme is as follows: