diff options
author | Richard Maw <richard.maw@gmail.com> | 2014-11-05 18:29:09 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2014-11-05 18:40:37 +0000 |
commit | 961263a151dd1999061f50fe7d43644c373c4134 (patch) | |
tree | 6f9a19052433552d68458afa1f2256e79ac2fd2d | |
parent | c21afe1dbe5867306a12c15637607536aab3c47f (diff) | |
download | morph-961263a151dd1999061f50fe7d43644c373c4134.tar.gz |
yarns: Add run-depends when adding new artifact split
-rwxr-xr-x | scripts/edit-morph | 11 | ||||
-rw-r--r-- | yarns/splitting.yarn | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/scripts/edit-morph b/scripts/edit-morph index 90679b23..05c947f6 100755 --- a/scripts/edit-morph +++ b/scripts/edit-morph @@ -205,6 +205,17 @@ class EditMorph(cliapp.Application): with self._open_yaml(file_path) as d: d['products'] = yaml.load(match_rules) + def cmd_add_stratum_run_depend(self, + (file_path, artifact, dep_path, dep_artifact)): + '''Add a rule to a stratum's runtime depends + + Usage: FILE_PATH MY_ARTIFACT DEP_PATH DEP_ARTIFACT + + ''' + with self._open_yaml(file_path) as d: + d.setdefault('run-depends', {}).setdefault(artifact, []).append( + {'morph': dep_path, 'artifact': dep_artifact}) + @classmethod def _splice_cluster_system(cls, syslist, syspath): sysname = syspath[0] diff --git a/yarns/splitting.yarn b/yarns/splitting.yarn index 4c776047..c5e7124c 100644 --- a/yarns/splitting.yarn +++ b/yarns/splitting.yarn @@ -216,5 +216,8 @@ Implementations build-depends: - test-chunk EOF + "$SRCDIR/scripts/edit-morph" add-stratum-run-depend \ + "$DATADIR/gits/morphs/$MATCH_1" "$MATCH_2" \ + strata/build-essential.morph build-essential-runtime run_in "$DATADIR/gits/morphs" git add "$MATCH_1" run_in "$DATADIR/gits/morphs" git commit -m "add $MATCH_2 to stratum" |