summaryrefslogtreecommitdiff
path: root/morphlib/builder2.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-01-28 11:26:51 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-01-28 13:04:36 +0000
commit1f54e675c739052d7a29592bd2634d6e0ae5eea3 (patch)
tree05a5843eb073c1490a4cc5ea94ac4304cf51de3f /morphlib/builder2.py
parent6d50cfe8df892b10dd5c1312e013d8e228648bc7 (diff)
downloadmorph-1f54e675c739052d7a29592bd2634d6e0ae5eea3.tar.gz
Include morph-version in artifact metadata
This can be used to rebuild an artifact with the exact same version of morph. Eventually there may be a tool to do this, but it allows for expert diagnosis until that point.
Diffstat (limited to 'morphlib/builder2.py')
-rw-r--r--morphlib/builder2.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/morphlib/builder2.py b/morphlib/builder2.py
index a60c4a47..ac40bf22 100644
--- a/morphlib/builder2.py
+++ b/morphlib/builder2.py
@@ -33,6 +33,7 @@ import cliapp
import morphlib
from morphlib.artifactcachereference import ArtifactCacheReference
+import morphlib.gitversion
def ldconfig(runcmd, rootdir): # pragma: no cover
@@ -204,6 +205,12 @@ class BuilderBase(object):
'morphology': self.artifact.source.filename,
'cache-key': self.artifact.cache_key,
'cache-id': self.artifact.cache_id,
+ 'morph-version': {
+ 'ref': morphlib.gitversion.ref,
+ 'tree': morphlib.gitversion.tree,
+ 'commit': morphlib.gitversion.commit,
+ 'version': morphlib.gitversion.version,
+ },
}
return meta