Skip to content
This repository has been archived by the owner on Mar 20, 2019. It is now read-only.

Commit

Permalink
Updated release script.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed May 3, 2013
1 parent 106584e commit a9392f8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion release.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@ def _tag(self):
tag_opts[0] = '-u ' + self.keyid
self.execute(os.system, ('git tag ' + (' '.join(tag_opts)),))

def _do_call_publish(self, cmd):
self._published = os.system(cmd) == 0

def _publish(self):
web_repo = os.getenv('YUBICO_GITHUB_REPO')
if web_repo and os.path.isdir(web_repo):
Expand All @@ -96,9 +99,13 @@ def _publish(self):
]
cmd = '%s/publish %s %s %s' % (
web_repo, self.name, self.version, ' '.join(artifacts))
if self.execute(os.system, (cmd,)) == 0:

self.execute(self._do_call_publish, (cmd,))
if self._published:
self.announce("Release published! Don't forget to:", log.INFO)
self.announce("")
self.announce(" (cd %s && git push)" % web_repo, log.INFO)
self.announce("")
else:
self.warn("There was a problem publishing the release!")
else:
Expand Down Expand Up @@ -138,4 +145,6 @@ def run(self):
self._publish()

self.announce("Release complete! Don't forget to:", log.INFO)
self.announce("")
self.announce(" git push && git push --tags", log.INFO)
self.announce("")

0 comments on commit a9392f8

Please sign in to comment.