Skip to content

Commit

Permalink
fix: Make changelog problems not fail whole publish
Browse files Browse the repository at this point in the history
Can be fixed with changelog command later.
  • Loading branch information
relekang committed May 5, 2017
1 parent fe908d4 commit b5a68cf
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions semantic_release/cli.py
Expand Up @@ -4,6 +4,7 @@
import click

from semantic_release import ci_checks
from semantic_release.errors import GitError

from .history import (evaluate_version_bump, get_current_version, get_new_version,
get_previous_version, set_new_version)
Expand Down Expand Up @@ -132,13 +133,17 @@ def publish(**kwargs):

if check_token():
click.echo('Updating changelog')
log = generate_changelog(current_version, new_version)
post_changelog(
owner,
name,
new_version,
markdown_changelog(new_version, log, header=False)
)
try:
log = generate_changelog(current_version, new_version)
post_changelog(
owner,
name,
new_version,
markdown_changelog(new_version, log, header=False)
)
except GitError:
click.echo(click.style('Posting changelog failed.', 'red'), err=True)

else:
click.echo(
click.style('Missing token: cannot post changelog', 'red'), err=True)
Expand Down

0 comments on commit b5a68cf

Please sign in to comment.