Skip to content

Commit

Permalink
computed should print the full semver including the sha
Browse files Browse the repository at this point in the history
  • Loading branch information
sstarcher committed Feb 24, 2020
1 parent f11f71b commit 6202089
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,21 +54,6 @@ var rootCmd = &cobra.Command{
}

nextType := version.NewNextType(bump)
if printComputedVersion {
value, err := getter.Get()
if err != nil {
return err
}

ver, err := version.NextVersion(value, nextType)
if err != nil {
return err
}

_, err = os.Stdout.WriteString(ver.String())
return err
}

chart, err := helm.New(dir, &tagPath)
if err != nil {
return err
Expand All @@ -79,6 +64,11 @@ var rootCmd = &cobra.Command{
return err
}

if printComputedVersion {
_, err = os.Stdout.WriteString(version.String())
return err
}

log.Infof("updating the Chart.yaml to version %s", version.String())
if tag != "" {
err = chart.UpdateImageVersion(tag)
Expand Down

0 comments on commit 6202089

Please sign in to comment.