fix: add prompt before publishing
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
cellarspoon 2021-12-28 01:51:39 +01:00
parent a700aca23d
commit 1f91b3bb03
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410

View File

@ -378,6 +378,21 @@ func createReleaseFromPreviousTag(tagString, mainAppVersion string, recipe recip
newTag.Metadata = mainAppVersion
newTagString := newTag.String()
if !internal.NoInput {
prompt := &survey.Confirm{
Message: fmt.Sprintf("current: %s, new: %s, correct?", lastGitTag, newTagString),
}
var ok bool
if err := survey.AskOne(prompt, &ok); err != nil {
logrus.Fatal(err)
}
if !ok {
logrus.Fatal("exiting as requested")
}
}
if err := commitRelease(recipe, newTagString); err != nil {
logrus.Fatal(err)
}