Skip to content

Commit

Permalink
fix(changelog): Fix broken URLs by invoking 'clog' properly. (#1495)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtk54 committed Mar 21, 2017
1 parent d891adf commit 6f362e3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions dev/generate_bom.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,13 @@ def generate_changelog(self):

# Generate the changelog for the component.
print 'Generating changelog for {comp}...'.format(comp=comp)
result = run_quick('cd {comp}; clog -f {hash} --setversion {version}; cd ..'
.format(comp=comp, hash=hash, version=version))
# Assumes the remote repository is aliased as 'origin'.
component_url = run_quick('git -C {path} config --get remote.origin.url'
.format(path=comp)).stdout.strip()
if component_url.endswith('.git'):
component_url = component_url.replace('.git', '')
result = run_quick('cd {comp}; clog -r {url} -f {hash} --setversion {version}; cd ..'
.format(comp=comp, url=component_url, hash=hash, version=version))
if result.returncode != 0:
print "Changelog generation failed for {0} with \n{1}\n exiting...".format(comp, result.stdout)
exit(result.returncode)
Expand Down

0 comments on commit 6f362e3

Please sign in to comment.