fix: 解决应用名称存在大写导致无法升级的问题 (#4987)
Some checks failed
Build / SonarCloud (push) Failing after -4m8s
sync2gitee / repo-sync (push) Failing after -4m10s
Build Test / build-linux-binary (push) Failing after 8s

Refs https://github.com/1Panel-dev/1Panel/issues/4986
This commit is contained in:
zhengkunwang 2024-05-12 22:16:28 +08:00 committed by GitHub
parent 95bbf4ee52
commit 79c2ba2125
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -455,7 +455,7 @@ func upgradeInstall(installID uint, detailID uint, backup, pullImage bool) error
upErr error
backupFile string
)
global.LOG.Infof(i18n.GetMsgByKey("UpgradeAppStart"))
global.LOG.Infof(i18n.GetMsgWithName("UpgradeAppStart", install.Name, nil))
if backup {
backupRecord, err := NewIBackupService().AppBackup(dto.CommonBackup{Name: install.App.Key, DetailName: install.Name})
if err == nil {
@ -587,7 +587,8 @@ func upgradeInstall(installID uint, detailID uint, backup, pullImage bool) error
}
if pullImage {
images, err := composeV2.GetDockerComposeImages(install.Name, content, []byte(detail.DockerCompose))
projectName := strings.ToLower(install.Name)
images, err := composeV2.GetDockerComposeImages(projectName, content, []byte(detail.DockerCompose))
if err != nil {
upErr = err
return