diff options
-rwxr-xr-x | GIT-VERSION-GEN | 9 | ||||
-rw-r--r-- | Makefile | 1 |
2 files changed, 3 insertions, 7 deletions
diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 4e7f0e3..016c829 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,17 +1,12 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=v0.1.0.GIT +DEF_VER=v0.1.1 LF=' ' -# First see if there is a version file (included in release tarballs), -# then try git-describe, then default. -if test -f version -then - VN=$(cat version) || VN="$DEF_VER" -elif test -d .git -o -f .git && +if test -d .git -o -f .git && VN=$(git describe --abbrev=4 HEAD 2>/dev/null) && case "$VN" in *$LF*) (exit 1) ;; @@ -39,5 +39,6 @@ dist: GIT-VERSION-FILE mv $(DISTNAME).tar.gz+ $(DISTNAME).tar.gz clean: $(RM) $(PCU_BIN) $(DISTNAME).tar.gz* + $(RM) GIT-VERSION-FILE .PHONY: .FORCE-GIT-VERSION-FILE |