refactor(recipe): remove remaining usage of old recipe struct

This commit is contained in:
2024-07-08 13:15:20 +02:00
parent c1b03bcbd7
commit 5617a9ba07
24 changed files with 167 additions and 189 deletions

View File

@ -30,7 +30,7 @@ func NewVersionOverview(app appPkg.App, currentVersion, newVersion, releaseNotes
server = "local"
}
table.Append([]string{server, app.Recipe, deployConfig, app.Domain, currentVersion, newVersion})
table.Append([]string{server, app.Recipe.Name, deployConfig, app.Domain, currentVersion, newVersion})
table.Render()
if releaseNotes != "" && newVersion != "" {
@ -84,7 +84,7 @@ func GetReleaseNotes(recipeName, version string) (string, error) {
// the commands string must have the following format:
// "<service> <command> <arguments>|<service> <command> <arguments>|... "
func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
abraSh := path.Join(config.RECIPES_DIR, app.Recipe, "abra.sh")
abraSh := path.Join(config.RECIPES_DIR, app.Recipe.Name, "abra.sh")
if _, err := os.Stat(abraSh); err != nil {
if os.IsNotExist(err) {
return fmt.Errorf(fmt.Sprintf("%s does not exist for %s?", abraSh, app.Name))
@ -105,7 +105,7 @@ func PostCmds(cl *dockerClient.Client, app appPkg.App, commands string) error {
}
log.Infof("running post-command '%s %s' in container %s", cmdName, parsedCmdArgs, targetServiceName)
if err := EnsureCommand(abraSh, app.Recipe, cmdName); err != nil {
if err := EnsureCommand(abraSh, app.Recipe.Name, cmdName); err != nil {
return err
}
@ -150,7 +150,7 @@ func DeployOverview(app appPkg.App, version, message string) error {
server = "local"
}
table.Append([]string{server, app.Recipe, deployConfig, app.Domain, version})
table.Append([]string{server, app.Recipe.Name, deployConfig, app.Domain, version})
table.Render()
if NoInput {