feat: add dryflag, implement push for catalogue generate

This commit is contained in:
2021-12-19 23:59:40 +01:00
parent 217d4bc2cc
commit bf82bc9c7f
3 changed files with 5 additions and 4 deletions

View File

@ -63,6 +63,7 @@ var catalogueGenerateCommand = &cli.Command{
internal.PushFlag,
internal.CommitFlag,
internal.CommitMessageFlag,
internal.DryFlag,
},
Description: `
This command generates a new copy of the recipe catalogue which can be found on:
@ -233,7 +234,7 @@ A new catalogue copy can be published to the recipes repository by passing the
}
}
if err := gitPkg.Commit("**.json", internal.CommitMessage, false); err != nil {
if err := gitPkg.Commit("**.json", internal.CommitMessage, internal.Dry, internal.Push); err != nil {
logrus.Fatal(err)
}
}

View File

@ -155,7 +155,7 @@ You may invoke this command in "wizard" mode and be prompted for input:
logrus.Fatal("no commit message specified?")
}
if err := gitPkg.Commit("compose.**yml", internal.CommitMessage, internal.Dry); err != nil {
if err := gitPkg.Commit("compose.**yml", internal.CommitMessage, internal.Dry, false); err != nil {
logrus.Fatal(err)
}