From 6306ac5db1dff2327e6dafbbdaaa2cc51ce98bda Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 29 Jul 2017 18:51:19 +0300 Subject: Add: scenario step configures multiple projects --- yarns/900.yarn | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'yarns') diff --git a/yarns/900.yarn b/yarns/900.yarn index 4727dbd..8ee31f3 100644 --- a/yarns/900.yarn +++ b/yarns/900.yarn @@ -37,14 +37,19 @@ IMPLEMENTS GIVEN a project (\S+), using (\S+), publishing to (\S+) project = yarnutils.get_next_match() repo = yarnutils.get_next_match() - server = yarnutils.get_next_match() - config = { - 'projects': { - project: { - 'git': repo, - 'shell_steps': ['ikiwiki --build', 'rsync'], - }, - }, + + if os.path.exists('ick.ick'): + config = yaml.safe_load(open('ick.ick')) + else: + config = { + 'projects': {} + } + config['projects'][project] = { + 'git': repo, + 'shell_steps': [ + 'ikiwiki --build', + 'rsync', + ], } write('ick.ick', yaml.safe_dump(config)) -- cgit v1.2.1