summaryrefslogtreecommitdiff
path: root/get-git-tag
diff options
context:
space:
mode:
authorJulian Blake Kongslie2022-06-23 17:46:19 -0700
committerJulian Blake Kongslie2022-06-23 17:46:19 -0700
commite94cf0292758b8af5744c2331403580e1792acf7 (patch)
tree984ffe5c6e50e0f42dcc5216e03b1cc9160e7cff /get-git-tag
downloadissim-e94cf0292758b8af5744c2331403580e1792acf7.tar.xz
Initial commit.
Diffstat (limited to '')
-rwxr-xr-xget-git-tag15
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
3set -u
4
5TAG="$(git describe --always --tags --long --dirty 2> /dev/null)"
6
7if [[ "$TAG" == "" ]]; then
8 TAG="unknown"
9fi
10
11cat <<END
12#include <string>
13
14std::string GIT_TAG = "$TAG";
15END