summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-12 13:40:08 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2014-06-12 14:05:26 +0100
commit2ccfada6694221cf1ae46c386d7b0c4377d1221e (patch)
tree60db61158ae5d3eb47d31e982d6a18c05c5c8144
parent3e4edca024ae5ea0ff5516a7ae2402fae1108b83 (diff)
downloadmorph-2ccfada6694221cf1ae46c386d7b0c4377d1221e.tar.gz
Use abbreviated commit SHA as version number, rather than the tag
This still (ab)uses 'git describe', in order to get an '-unreproducible' postfix when the tree has uncommitted changes. Previously we tagged morph.git with the name of the corresponding Baserock release that it was to be part of. This made the Baserock release process awkward. We needed to first create and test the release images, then (once we knew the version of Morph we were releasing was good) tag morph.git, and then build all the release images again so that the new tag would be picked up and the output of `morph --version` would be correct.
-rw-r--r--setup.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/setup.py b/setup.py
index 59b95b64..765cf045 100644
--- a/setup.py
+++ b/setup.py
@@ -84,8 +84,9 @@ class GenerateResources(build):
raise subprocess.CalledProcessError(p.returncode, command)
f.write(o[0].strip())
- save_git_info('version', 'describe', '--always',
- '--dirty=-unreproducible')
+ save_git_info('version', 'describe', '--abbrev=40', '--always',
+ '--dirty=-unreproducible',
+ '--match=DO-NOT-MATCH-ANY-TAGS')
save_git_info('commit', 'rev-parse', 'HEAD^{commit}')
save_git_info('tree', 'rev-parse', 'HEAD^{tree}')
save_git_info('ref', 'rev-parse', '--symbolic-full-name', 'HEAD')