Skip to content

Commit

Permalink
fix(cli): Fix check of token in changelog command
Browse files Browse the repository at this point in the history
  • Loading branch information
relekang committed Aug 19, 2015
1 parent a140ecd commit cc6e6ab
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions semantic_release/cli.py
Expand Up @@ -82,17 +82,18 @@ def changelog(**kwargs):
click.echo(' - {}'.format(item))
click.echo('\n')

if not kwargs.get('noop') and kwargs.get('post') and check_token():
owner, name = get_repository_owner_and_name()
click.echo('Updating changelog')
post_changelog(
owner,
name,
current_version,
markdown_changelog(current_version, log, header=False)
)
else:
click.echo(click.style('Missing token: cannot post changelog', 'red'), err=True)
if not kwargs.get('noop') and kwargs.get('post'):
if check_token():
owner, name = get_repository_owner_and_name()
click.echo('Updating changelog')
post_changelog(
owner,
name,
current_version,
markdown_changelog(current_version, log, header=False)
)
else:
click.echo(click.style('Missing token: cannot post changelog', 'red'), err=True)


def publish(**kwargs):
Expand Down

0 comments on commit cc6e6ab

Please sign in to comment.