diff options
| author | Julian Blake Kongslie | 2022-06-23 17:46:19 -0700 |
|---|---|---|
| committer | Julian Blake Kongslie | 2022-06-23 17:46:19 -0700 |
| commit | e94cf0292758b8af5744c2331403580e1792acf7 (patch) | |
| tree | 984ffe5c6e50e0f42dcc5216e03b1cc9160e7cff /get-git-tag | |
| download | issim-e94cf0292758b8af5744c2331403580e1792acf7.tar.xz | |
Initial commit.
Diffstat (limited to '')
| -rwxr-xr-x | get-git-tag | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/get-git-tag b/get-git-tag new file mode 100755 index 0000000..cb4e2fa --- /dev/null +++ b/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 | ||
