From e94cf0292758b8af5744c2331403580e1792acf7 Mon Sep 17 00:00:00 2001 From: Julian Blake Kongslie Date: Thu, 23 Jun 2022 17:46:19 -0700 Subject: Initial commit. --- get-git-tag | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 get-git-tag (limited to 'get-git-tag') 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 @@ +#!/bin/bash + +set -u + +TAG="$(git describe --always --tags --long --dirty 2> /dev/null)" + +if [[ "$TAG" == "" ]]; then + TAG="unknown" +fi + +cat < + +std::string GIT_TAG = "$TAG"; +END -- cgit v1.2.3