diff options
author | Bob Mottram <bob.mottram@codethink.co.uk> | 2015-03-31 12:21:48 +0100 |
---|---|---|
committer | Francisco Redondo <francisco.marchena@codethink.co.uk> | 2015-06-11 16:01:37 +0000 |
commit | 5a6c1a08d1b9a0ff76215cace56e15114cf5a59e (patch) | |
tree | 579d1a889b4c4aa199cc3b459e8b1ab05f3814f6 | |
parent | e9be89d2d8ec884d890e9db90e37de3981f3b83e (diff) | |
download | firehose-5a6c1a08d1b9a0ff76215cace56e15114cf5a59e.tar.gz |
Change underscores to dashes
To be compliant with the baserock convention
Change-Id: I9e6830c48fa1939a4bc8409faaaed964208f897b
-rw-r--r-- | firehose.configure | 9 | ||||
-rw-r--r-- | firehose/plugin/firehose_plugin.py | 16 |
2 files changed, 12 insertions, 13 deletions
diff --git a/firehose.configure b/firehose.configure index 7d129dd..9c809f6 100644 --- a/firehose.configure +++ b/firehose.configure @@ -46,10 +46,10 @@ fi # Create firehose.conf to store parameters obtained from .morph file cat >>"$ROOT/etc/firehose.conf" <<EOF [config] -gerrit_username = $GERRIT_USERNAME -gerrit_url = $GERRIT_URL -git_username = $GIT_USERNAME -git_email = $GIT_EMAIL +gerrit-username = $GERRIT_USERNAME +gerrit-url = $GERRIT_URL +git-username = $GIT_USERNAME +git-email = $GIT_EMAIL EOF # Become firehose user @@ -60,4 +60,3 @@ cat >>"$ROOT/home/firehose/.gitconfig" <<EOF git config --global user.name "$GIT_USER" git config --global user.email "$GIT_EMAIL" EOF - diff --git a/firehose/plugin/firehose_plugin.py b/firehose/plugin/firehose_plugin.py index 09406aa..05460f8 100644 --- a/firehose/plugin/firehose_plugin.py +++ b/firehose/plugin/firehose_plugin.py @@ -41,16 +41,16 @@ class FirehosePlugin(cliapp.Plugin): def enable(self): self.app.add_subcommand('firehose', self.firehose_cmd, arg_synopsis='some-firehose.yaml...') - self.app.settings.string(['gerrit_username'], + self.app.settings.string(['gerrit-username'], 'Username for gerrit', default=None) - self.app.settings.string(['gerrit_url'], + self.app.settings.string(['gerrit-url'], 'URL for gerrit', default='gerrit.baserock.org') - self.app.settings.string(['git_username'], + self.app.settings.string(['git-username'], 'git username', default=None) - self.app.settings.string(['git_email'], + self.app.settings.string(['git-email'], 'git email address', default=None) @@ -130,8 +130,8 @@ class FirehosePlugin(cliapp.Plugin): log.write('{\"sha\":\"'+sha+'\"}') def insert_githook(self): - gerrit_username = self.app.settings['gerrit_username'] - gerrit_url = self.app.settings['gerrit_url'] + gerrit_username = self.app.settings['gerrit-username'] + gerrit_url = self.app.settings['gerrit-url'] scp_cmd = ('scp', '-p', '-P', '29418', gerrit_username+'@'+gerrit_url+':hooks/commit-msg', self.gitpath+'/.git/hooks/commit-msg') os.system(' '.join(scp_cmd)) @@ -261,8 +261,8 @@ class FirehosePlugin(cliapp.Plugin): return True def commit_and_push(self, name): - gerrit_username = self.app.settings['gerrit_username'] - gerrit_url = self.app.settings['gerrit_url'] + gerrit_username = self.app.settings['gerrit-username'] + gerrit_url = self.app.settings['gerrit-url'] commit_msg = 'Update to '+name+' ref in definitions.git' branch_name = 'HEAD:refs/for/master/firehose/'+name (code, out, err) = self.app.runcmd_unchecked( |