Skip to content

Commit

Permalink
Passing --commit-changelog to release now commits your curated ch…
Browse files Browse the repository at this point in the history
…angelog
  • Loading branch information
michaeljoseph committed Sep 3, 2013
1 parent 46d56a9 commit 1ce4074
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ What is the release version for "changes" [Default: 0.1.1]:
INFO:changes.cli:Added content to CHANGELOG.md
Everything up-to-date
INFO:changes.cli:Committed changelog update
(changes)➜ changes git:(master) ✗ changes -p changes release

<< changelog pruning >>

(changes)➜ changes git:(master) ✗ changes -p changes release --commit-changelog
What is the release version for "changes" [Default: 0.1.1]:
Counting objects: 7, done.
Delta compression using up to 8 threads.
Expand Down
9 changes: 5 additions & 4 deletions changes/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,11 @@ def version(arguments):

replace_attribute(app_name, '__version__', new_version, dry_run=dry_run)

execute(
['git', 'ci', '-m', new_version, '%s/__init__.py' % app_name],
dry_run=dry_run
)
commands = ['git', 'ci', '-m', new_version, '%s/__init__.py' % app_name]
if arguments['--commit-changelog']:
commands.append('CHANGELOG.md')

execute(commands, dry_run=dry_run)

execute(['git', 'push'], dry_run=dry_run)

Expand Down

0 comments on commit 1ce4074

Please sign in to comment.