Explorar el Código

Fix hash retrieval in get_version

git-describe will prefer annotated tags, git-log has much more straightforward solution
Alois Mahdal hace 9 años
padre
commit
93720b5fe5
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1
    1
      setup/mk.sh

+ 1
- 1
setup/mk.sh Ver fichero

@@ -191,7 +191,7 @@ get_version() {
191 191
         local lasttag=$(git tag | grep ^v | sort -V | tail -n1)
192 192
         if ! git describe --tags --exact-match HEAD >&/dev/null;
193 193
         then    # we are not at later commit than the last tag
194
-            local sha=g$(git describe --always HEAD)
194
+            local sha=g$(git log -1 --pretty=format:%h HEAD)
195 195
         fi
196 196
         if test "$(git diff --shortstat 2>/dev/null)" != "";
197 197
         then    # thr tree is "dirty", i.e. has been edited