mirror of
https://github.com/rancher/cli.git
synced 2026-02-05 09:48:36 +01:00
Merge pull request #239 from gitlawr/project_app_upgrade
Fix project-scoped catalog app upgrade
This commit is contained in:
11
cmd/app.go
11
cmd/app.go
@@ -468,14 +468,9 @@ func updateExternalIDVersion(externalID string, version string) (string, error)
|
||||
return "", err
|
||||
}
|
||||
|
||||
q := u.Query()
|
||||
q.Set("version", version)
|
||||
// Need to unescape here to get the raw string for the externalId filter
|
||||
catalogQuery, err := url.QueryUnescape(q.Encode())
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return "catalog://?" + catalogQuery, nil
|
||||
oldVersionQuery := fmt.Sprintf("version=%s", u.Query().Get("version"))
|
||||
newVersionQuery := fmt.Sprintf("version=%s", version)
|
||||
return strings.Replace(externalID, oldVersionQuery, newVersionQuery, 1), nil
|
||||
}
|
||||
|
||||
func appRollback(ctx *cli.Context) error {
|
||||
|
||||
Reference in New Issue
Block a user