diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2013-01-28 11:26:51 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2013-01-28 13:04:36 +0000 |
commit | 1f54e675c739052d7a29592bd2634d6e0ae5eea3 (patch) | |
tree | 05a5843eb073c1490a4cc5ea94ac4304cf51de3f | |
parent | 6d50cfe8df892b10dd5c1312e013d8e228648bc7 (diff) | |
download | morph-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.
-rw-r--r-- | morphlib/builder2.py | 7 |
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 |