Skip to content

Commit

Permalink
Refactor changelog filename setting
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljoseph committed Sep 3, 2013
1 parent 0aba00c commit c8cabfd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions changes/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

log = logging.getLogger(__name__)

CHANGELOG = 'CHANGELOG.md'

def extract(dictionary, keys):
"""
Expand Down Expand Up @@ -145,9 +146,10 @@ def version(arguments):

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

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

execute(commands, dry_run=dry_run)

Expand Down Expand Up @@ -194,7 +196,7 @@ def changelog(arguments):

write_new_changelog(
app_name,
'CHANGELOG.md',
CHANGELOG,
changelog_content,
dry_run=dry_run
)
Expand Down

0 comments on commit c8cabfd

Please sign in to comment.