From f61456bca55644b432568f4a57bb01c58243d2de Mon Sep 17 00:00:00 2001 From: Firehose merge bot Date: Thu, 7 Aug 2014 13:22:30 +0100 Subject: More tweaks, set up for running against internal trove --- plugin/firehose_plugin.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'plugin') diff --git a/plugin/firehose_plugin.py b/plugin/firehose_plugin.py index 6f9cc12..25e2eb4 100644 --- a/plugin/firehose_plugin.py +++ b/plugin/firehose_plugin.py @@ -86,7 +86,7 @@ class FirehosePlugin(cliapp.Plugin): for c in confs: self.update_for_conf(c) if self.updated_morphologies(): - print self.app.runcmd_unchecked(["git", "diff"], cwd=self.gitpath)[1] + self.commit_and_push() def make_path(self, *subpath): return os.path.join(self.base_path, *subpath) @@ -229,3 +229,12 @@ class FirehosePlugin(cliapp.Plugin): morph.dirty = False return True + + def commit_and_push(self): + (code, out, err) = self.app.runcmd_unchecked( + ['git', 'commit', '-a', '-m', 'Firehose test commit'], + cwd=self.gitpath) + if code == 0: + self.app.runcmd(['git', 'push', 'origin', 'HEAD'], + cwd=self.gitpath) + -- cgit v1.2.1