diff options
Diffstat (limited to 'plugin/firehose_plugin.py')
-rw-r--r-- | plugin/firehose_plugin.py | 11 |
1 files changed, 10 insertions, 1 deletions
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) + |