This commit is contained in:
@ -316,22 +316,23 @@ func getAvailableUpgrades(cl *dockerclient.Client, stackName string, recipeName
|
||||
|
||||
// processRecipeRepoVersion clones, pulls, checks out the version and lints the
|
||||
// recipe repository.
|
||||
func processRecipeRepoVersion(recipeName, version string) error {
|
||||
if err := recipe.EnsureExists(recipeName); err != nil {
|
||||
func processRecipeRepoVersion(recipe recipe.Recipe, version string) error {
|
||||
if err := recipe.EnsureExists(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := recipe.EnsureUpToDate(recipeName); err != nil {
|
||||
if err := recipe.EnsureUpToDate(); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err := recipe.EnsureVersion(recipeName, version); err != nil {
|
||||
if err := recipe.EnsureVersion(version); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if r, err := recipe.Get(recipeName, internal.Offline); err != nil {
|
||||
if err := recipe.LoadConfig(); err != nil {
|
||||
return err
|
||||
} else if err := lint.LintForErrors(r); err != nil {
|
||||
}
|
||||
if err := lint.LintForErrors(recipe); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@ -442,7 +443,12 @@ func upgrade(cl *dockerclient.Client, stackName, recipeName,
|
||||
Env: env,
|
||||
}
|
||||
|
||||
if err = processRecipeRepoVersion(recipeName, upgradeVersion); err != nil {
|
||||
recipe, err := recipe.Get(recipeName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if err = processRecipeRepoVersion(recipe, upgradeVersion); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user