fix: handle dry run output result correctly
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
866cdd1f29
commit
299276c383
|
@ -235,11 +235,11 @@ keys configured on your account.
|
||||||
logrus.Fatal(err)
|
logrus.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if internal.Dry {
|
if !internal.Dry {
|
||||||
logrus.Info("dry run: no changes published")
|
|
||||||
} else {
|
|
||||||
url := fmt.Sprintf("%s/recipes/commits/%s", config.REPOS_BASE_URL, head.Hash())
|
url := fmt.Sprintf("%s/recipes/commits/%s", config.REPOS_BASE_URL, head.Hash())
|
||||||
logrus.Infof("new changes published: %s", url)
|
logrus.Infof("new changes published: %s", url)
|
||||||
|
} else {
|
||||||
|
logrus.Info("dry run: no changes published")
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
|
|
@ -292,10 +292,12 @@ func pushRelease(recipe recipe.Recipe, tagString string) error {
|
||||||
if err := recipe.Push(internal.Dry); err != nil {
|
if err := recipe.Push(internal.Dry); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
url := fmt.Sprintf("%s/%s/tags/%s", config.REPOS_BASE_URL, recipe.Name, tagString)
|
if !internal.Dry {
|
||||||
logrus.Infof("new release published: %s", url)
|
url := fmt.Sprintf("%s/%s/tags/%s", config.REPOS_BASE_URL, recipe.Name, tagString)
|
||||||
|
logrus.Infof("new release published: %s", url)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue