Skip to content

Commit

Permalink
Discard sh intermediates
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Nov 15, 2013
1 parent 9df6e19 commit 8796606
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions changes/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,20 @@
def commit_version_change():
module_name, dry_run, new_version = config.common_arguments()

commit_result = shell.handle_dry_run(
shell.handle_dry_run(
sh.git.commit,
('-m', new_version, '%s/__init__.py' % module_name, config.CHANGELOG)
)

if commit_result:
push_result = shell.handle_dry_run(sh.git.push, ())
if not push_result:
raise Exception('Version change commit failed')
shell.handle_dry_run(sh.git.push, ())


def tag():
_, dry_run, new_version = config.common_arguments()

tag_result = shell.handle_dry_run(
shell.handle_dry_run(
sh.git.tag,
('-a', new_version, '-m', '"%s"' % new_version)
)

if tag_result:
push_tags_result = shell.handle_dry_run(sh.git.push, ('--tags'))
if not push_tags_result:
raise Exception('Tagging failed')
shell.handle_dry_run(sh.git.push, ('--tags'))

0 comments on commit 8796606

Please sign in to comment.