diff options
| author | Julian Blake Kongslie | 2022-06-25 10:15:54 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-25 10:15:54 -0700 |
| commit | 308a7b72731d0d94b7931cee5963193bf143bb72 (patch) | |
| tree | 0f7c29b6e8b8ba4899532398de6cfb8d68b6f8af /tools | |
| parent | Makefile rework, supporting "nested" components. (diff) | |
| download | issim-308a7b72731d0d94b7931cee5963193bf143bb72.tar.xz | |
Move get-git-tag to a tools subdirectory.
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/get-git-tag | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/get-git-tag b/tools/get-git-tag new file mode 100755 index 0000000..cb4e2fa --- /dev/null +++ b/tools/get-git-tag | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | |||
| 3 | set -u | ||
| 4 | |||
| 5 | TAG="$(git describe --always --tags --long --dirty 2> /dev/null)" | ||
| 6 | |||
| 7 | if [[ "$TAG" == "" ]]; then | ||
| 8 | TAG="unknown" | ||
| 9 | fi | ||
| 10 | |||
| 11 | cat <<END | ||
| 12 | #include <string> | ||
| 13 | |||
| 14 | std::string GIT_TAG = "$TAG"; | ||
| 15 | END | ||
