refactor: spec out new release command breakdown
This commit is contained in:
parent
36af302d5f
commit
c75c2254e4
|
@ -149,6 +149,34 @@ var recipeCreateCommand = &cli.Command{
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var recipeUpgradeCommand = &cli.Command{
|
||||||
|
Name: "upgrade",
|
||||||
|
Usage: "Upgrade recipe image tags",
|
||||||
|
ArgsUsage: "<recipe>",
|
||||||
|
Action: func(c *cli.Context) error {
|
||||||
|
recipe := c.Args().First()
|
||||||
|
if recipe == "" {
|
||||||
|
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
||||||
|
}
|
||||||
|
// TODO: part 1 of https://git.coopcloud.tech/coop-cloud/go-abra/issues/39#issuecomment-8066
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
var recipeSyncCommand = &cli.Command{
|
||||||
|
Name: "sync",
|
||||||
|
Usage: "Generate recipe labels and publish tags",
|
||||||
|
ArgsUsage: "<recipe>",
|
||||||
|
Action: func(c *cli.Context) error {
|
||||||
|
recipe := c.Args().First()
|
||||||
|
if recipe == "" {
|
||||||
|
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
||||||
|
}
|
||||||
|
// TODO: part 2 of https://git.coopcloud.tech/coop-cloud/go-abra/issues/39#issuecomment-8066
|
||||||
|
return nil
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
var recipeReleaseCommand = &cli.Command{
|
var recipeReleaseCommand = &cli.Command{
|
||||||
Name: "release",
|
Name: "release",
|
||||||
Usage: "Release a new recipe version",
|
Usage: "Release a new recipe version",
|
||||||
|
@ -158,25 +186,7 @@ var recipeReleaseCommand = &cli.Command{
|
||||||
if recipe == "" {
|
if recipe == "" {
|
||||||
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
internal.ShowSubcommandHelpAndError(c, errors.New("no recipe provided"))
|
||||||
}
|
}
|
||||||
|
// TODO: part 3 of https://git.coopcloud.tech/coop-cloud/go-abra/issues/39#issuecomment-8066
|
||||||
//TODO: read all local tags and read all upstream tags
|
|
||||||
// and then ask which you'd like to upgrade to
|
|
||||||
// ensure that this release isn't in local or upstream already
|
|
||||||
// after each choice, make change and show diff
|
|
||||||
|
|
||||||
//TODO: read the apps catalogue and read the latest version of the recipe
|
|
||||||
// read the latest local tag of the recipe
|
|
||||||
// if there are no new changes, and upstream/local point to same commit, there is nothing to update, bail
|
|
||||||
// if there are changes and the commit they both point to is different, then this is a new release
|
|
||||||
// figure out the new version
|
|
||||||
// if the catalogue latest and the local latest are the same, N+1 release
|
|
||||||
// otherwise, use the local latest tag as the new version
|
|
||||||
// apply that version to all labels and show diff
|
|
||||||
|
|
||||||
//TODO: offer to commit all the things
|
|
||||||
// offer to make a git tag for that with the new version
|
|
||||||
// offer to git push that upstream
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
@ -285,6 +295,8 @@ how reliable this app is to deploy and maintain in its current state.
|
||||||
recipeListCommand,
|
recipeListCommand,
|
||||||
recipeVersionCommand,
|
recipeVersionCommand,
|
||||||
recipeCreateCommand,
|
recipeCreateCommand,
|
||||||
|
recipeUpgradeCommand,
|
||||||
|
recipeSyncCommand,
|
||||||
recipeReleaseCommand,
|
recipeReleaseCommand,
|
||||||
recipeLintCommand,
|
recipeLintCommand,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue