diff options
author | Richard Maw <richard.maw@codethink.co.uk> | 2014-01-22 14:48:29 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@codethink.co.uk> | 2014-01-22 15:48:06 +0000 |
commit | e30b0c73cb6805689c58b3ed9d5dd091218e2df3 (patch) | |
tree | 44ad4e0a87c20cfd1635c691dbbb26c99a66bdd9 /scripts | |
parent | 52e2b4aa1463e0247b6d1ef1653bbacc5dc0e02c (diff) | |
download | morph-e30b0c73cb6805689c58b3ed9d5dd091218e2df3.tar.gz |
yarns: Add regression test for cache-key clash
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/edit-morph | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/scripts/edit-morph b/scripts/edit-morph index acb33b7e..2970cc6e 100755 --- a/scripts/edit-morph +++ b/scripts/edit-morph @@ -227,4 +227,22 @@ class EditMorph(cliapp.Application): with open(file_path, "w") as f: yaml.dump(d, f) + def cmd_set_stratum_match_rules(self, (file_path, match_rules)): + '''Set a stratum's match rules. + + Usage: FILE_PATH MATCH_RULES_YAML + + This sets the stratum's "products" field, which is used to + determine which chunk artifacts go into which stratum artifacts + the stratum produces. + + The match rules must be a string that yaml can parse. + + ''' + with open(file_path, "r") as f: + d = yaml.load(f) + d['products'] = yaml.load(match_rules) + with open(file_path, "w") as f: + yaml.dump(d, f) + EditMorph().run() |