Browse Source

Port get_version fix from mkit

Alois Mahdal 10 years ago
parent
commit
b8bd367451
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      setup/mk.sh

+ 1
- 1
setup/mk.sh View File

203
         local lasttag=$(git tag | grep ^v | sort -V | tail -n1)
203
         local lasttag=$(git tag | grep ^v | sort -V | tail -n1)
204
         if ! git describe --tags --exact-match HEAD >&/dev/null;
204
         if ! git describe --tags --exact-match HEAD >&/dev/null;
205
         then    # we are not at later commit than the last tag
205
         then    # we are not at later commit than the last tag
206
-            local sha=g$(git describe --always HEAD)
206
+            local sha=g$(git log -1 --pretty=format:%h HEAD)
207
         fi
207
         fi
208
         if test "$(git diff --shortstat 2>/dev/null)" != "";
208
         if test "$(git diff --shortstat 2>/dev/null)" != "";
209
         then    # thr tree is "dirty", i.e. has been edited
209
         then    # thr tree is "dirty", i.e. has been edited