aboutsummaryrefslogtreecommitdiff
path: root/build.bash
diff options
context:
space:
mode:
authorJakob Unterwurzacher2020-04-18 17:44:51 +0200
committerJakob Unterwurzacher2020-04-18 17:44:51 +0200
commit1c169ac55e79acb098c858a0448b9f30a4620a98 (patch)
treec1e9f86e46e81ed8ab028ddbd6dcb9c9ccb5a5c3 /build.bash
parent5da5e9fdf2db0f3c709a6662604d768865462068 (diff)
build.bash: handle missing git tags
The case of a git repo without any tags used to fail with: fatal: No names found, cannot describe anything. Now we continue, using "[no_tags_found]" as the version string.
Diffstat (limited to 'build.bash')
-rwxr-xr-xbuild.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/build.bash b/build.bash
index c19e789..b5a0c4d 100755
--- a/build.bash
+++ b/build.bash
@@ -24,7 +24,7 @@ GOPATH1=$(go env GOPATH | cut -f1 -d:)
# gocryptfs version according to git or a VERSION file
if [[ -d .git ]] ; then
- GITVERSION=$(git describe --tags --dirty)
+ GITVERSION=$(git describe --tags --dirty || echo "[no_tags_found]")
GITBRANCH=$(git rev-parse --abbrev-ref HEAD)
if [[ -n $GITBRANCH && $GITBRANCH != master ]] ; then
GITVERSION="$GITVERSION.$GITBRANCH"