Skip to content

Commit

Permalink
Merge pull request #10 from TwistoPayments/release-0.3.9.twisto.3
Browse files Browse the repository at this point in the history
fix get vcs
  • Loading branch information
Jiri Polansky authored Jul 3, 2019
2 parents 68bc61b + 365159a commit 23ade2a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions jenkinsapi/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,18 @@ def get_slave(self):
return self._data["builtOn"]

def get_revision(self):
vcs = self._data['changeSets'][0]['kind'] or 'git'
change_sets = self._data['changeSets']
vcs = change_sets[0]['kind'] if change_sets else 'git'
return getattr(self, '_get_%s_rev' % vcs, lambda: None)()

def get_revision_branch(self):
vcs = self._data['changeSets'][0]['kind'] or 'git'
change_sets = self._data['changeSets']
vcs = change_sets[0]['kind'] if change_sets else 'git'
return getattr(self, '_get_%s_rev_branch' % vcs, lambda: None)()

def get_repo_url(self):
vcs = self._data['changeSets'][0]['kind'] or 'git'
change_sets = self._data['changeSets']
vcs = change_sets[0]['kind'] if change_sets else 'git'
return getattr(self, '_get_%s_repo_url' % vcs, lambda: None)()

def get_params(self):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from setuptools import setup
import os

os.environ['PBR_VERSION'] = '0.3.9.twisto.2'
os.environ['PBR_VERSION'] = '0.3.9.twisto.3'

setup(
setup_requires=['pbr'],
Expand Down

0 comments on commit 23ade2a

Please sign in to comment.