diff options
author | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-09-19 16:51:23 +0100 |
---|---|---|
committer | Pedro Alvarez <pedro.alvarez@codethink.co.uk> | 2014-09-30 11:19:48 +0100 |
commit | faddf7dcecd77f52463eb1f827544e2e32468639 (patch) | |
tree | eea8084259b68e0e30027f44e40f5d3e866d081b /tests.as-root/metadata-includes-morph-version.script | |
parent | c754d0366d4557910775bfa83c85ffdf98af0610 (diff) | |
download | morph-faddf7dcecd77f52463eb1f827544e2e32468639.tar.gz |
Fix behaviour of `morph --version`
Currently, if morph is installed in the system, `morph --version`
prints the sha1 of the version installed.
$ morph --version
e8adedb8f3f27d9212caf277b8e8f7c6792a20c2
If you run morph from git, the output will be something similar to
the following.
$ morph --version
baserock-14.26-124-g7b73af4
This patch changes the behaviour of the latter to match the former.
Diffstat (limited to 'tests.as-root/metadata-includes-morph-version.script')
-rwxr-xr-x | tests.as-root/metadata-includes-morph-version.script | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests.as-root/metadata-includes-morph-version.script b/tests.as-root/metadata-includes-morph-version.script index f83712a7..772d7d50 100755 --- a/tests.as-root/metadata-includes-morph-version.script +++ b/tests.as-root/metadata-includes-morph-version.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2013 Codethink Limited +# Copyright (C) 2013 - 2014 Codethink Limited # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -28,7 +28,8 @@ set -eu # get git version info cd "$SRCDIR" -description="$(git describe --always --dirty=-unreproducible)" +description="$(git describe --abbrev=40 --always \ + --dirty=-unreproducible --match=DO-NOT-MATCH-ANY-TAGS)" commit="$(git rev-parse 'HEAD^{commit}')" tree="$(git rev-parse 'HEAD^{tree}')" ref="$(git rev-parse --symbolic-full-name 'HEAD')" |