Skip to content

Commit

Permalink
Try to bulletproof the git invocations in Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
oddhack committed Jul 9, 2024
1 parent bae9430 commit afb0e78
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit afb0e78

Please sign in to comment.