Skip to content

Commit

Permalink
fix(bom): Fail if Halyard fails. (#1455)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtk54 committed Mar 1, 2017
1 parent b2d8f51 commit 22edba6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions dev/generate_bom.py
Expand Up @@ -80,8 +80,12 @@ def write_bom(self):
output_yaml[SERVICES][comp] = version_entry

# Current publicly released version of Spinnaker product.
curr_version = run_quick('hal versions latest --color false', echo=False).stdout.strip()
print curr_version
result = run_quick('hal versions latest --color false', echo=False)
if result.returncode != 0:
print "'hal versions latest' command failed with: \n{0}\n exiting...".format(result.stdout)
exit(result.returncode)

curr_version = result.stdout.strip()
major, minor, patch = curr_version.split('.')
toplevel_version = ''
if breaking_change == True:
Expand Down Expand Up @@ -121,8 +125,11 @@ def __publish_bom(self, bom_path):
Assumes that Halyard is installed and correctly configured on the current
machine.
"""
run_quick('hal admin publish bom --color false --bom-path {0}'
.format(bom_path), echo=False)
result = run_quick('hal admin publish bom --color false --bom-path {0}'
.format(bom_path))
if result.returncode != 0:
print "'hal admin publish bom' command failed with: \n{0}\n exiting...".format(result.stdout)
exit(result.returncode)

def determine_and_tag_versions(self):
for comp in self.COMPONENTS:
Expand Down

0 comments on commit 22edba6

Please sign in to comment.