fix: add compose.yml before commiting with recipe release; reset parts of tag according to semver when releasing
This commit is contained in:
parent
3cd2399cca
commit
1cb5e3509d
@ -36,7 +36,7 @@ var DryFlag = &cli.BoolFlag{
|
||||
var CommitMessage string
|
||||
var CommitMessageFlag = &cli.StringFlag{
|
||||
Name: "commit-message",
|
||||
Usage: "commit message",
|
||||
Usage: "commit message. Implies --commit",
|
||||
Aliases: []string{"cm"},
|
||||
Destination: &CommitMessage,
|
||||
}
|
||||
@ -44,6 +44,7 @@ var CommitMessageFlag = &cli.StringFlag{
|
||||
var Commit bool
|
||||
var CommitFlag = &cli.BoolFlag{
|
||||
Name: "commit",
|
||||
Usage: "add compose.yml to staging area and commit changes",
|
||||
Value: false,
|
||||
Aliases: []string{"c"},
|
||||
Destination: &Commit,
|
||||
@ -118,6 +119,12 @@ or a rollback of an app.
|
||||
}
|
||||
survey.AskOne(prompt, &CommitMessage)
|
||||
}
|
||||
err = commitWorktree.AddGlob("compose.**yml")
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
logrus.Debug("staged compose.**yml for commit")
|
||||
|
||||
_, err = commitWorktree.Commit(CommitMessage, &git.CommitOptions{})
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
@ -214,12 +221,15 @@ or a rollback of an app.
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
newTag.Patch = "0"
|
||||
newTag.Minor = strconv.Itoa(now + 1)
|
||||
} else if Major {
|
||||
now, err := strconv.Atoi(newTag.Major)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
newTag.Patch = "0"
|
||||
newTag.Minor = "0"
|
||||
newTag.Major = strconv.Itoa(now + 1)
|
||||
}
|
||||
newTagString = newTag.String()
|
||||
|
Loading…
Reference in New Issue
Block a user