Skip to content

Commit

Permalink
Adjust build-stamp to always reflect the most recent tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jwnimmer-tri committed Mar 23, 2024
1 parent fec36a9 commit a0b7bd2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions stamp.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#!/bin/bash

# Use the first tag that points to the current HEAD
# if no tag is found, the latest git commit is used as a fallback
# Use the first tag that points to the current HEAD. If no tag is found, the
# summary given by `git describe` is used as a fallback (it contains the most
# recent tag name, the number of commits since, and the short git hash).

CURRENT_TAG=$(git tag -l --points-at HEAD | head -n1)
CURRENT_COMMIT=$(git rev-parse HEAD)
CURRENT_COMMIT=$(git describe --tags HEAD)

echo "STABLE_VERSION ${CURRENT_TAG:-$CURRENT_COMMIT}"
# rules_nodejs expects to read from volatile-status.txt
Expand Down

0 comments on commit a0b7bd2

Please sign in to comment.