mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-27 12:39:01 +08:00
fix: 解决本地应用升级失败的问题 (#1248)
This commit is contained in:
parent
b2e17d4c42
commit
5e7524e4f8
2
Makefile
2
Makefile
@ -34,3 +34,5 @@ build_backend_on_archlinux:
|
||||
&& CGO_ENABLED=1 GOOS=$(GOOS) GOARCH=$(GOARCH) $(GOBUILD) -trimpath -ldflags '-s -w --extldflags "-fpic"' -tags osusergo -o $(BUILD_PATH)/$(APP_NAME) $(MAIN)
|
||||
|
||||
build_all: build_frontend build_backend_on_linux
|
||||
|
||||
build_on_local: clean_asserts build_frontend build_backend_on_darwin upx_bin
|
||||
|
@ -354,9 +354,6 @@ func (a AppService) Install(ctx context.Context, req request.AppInstallCreate) (
|
||||
if err = upAppPre(app, appInstall); err != nil {
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
_, _ = http.Get(appDetail.DownloadCallBackUrl)
|
||||
}()
|
||||
upApp(appInstall)
|
||||
}()
|
||||
go updateToolApp(appInstall)
|
||||
|
@ -242,11 +242,15 @@ func upgradeInstall(installId uint, detailId uint) error {
|
||||
}
|
||||
}()
|
||||
|
||||
if upErr = downloadApp(install.App, detail, &install); upErr != nil {
|
||||
return
|
||||
}
|
||||
|
||||
detailDir := path.Join(constant.ResourceDir, "apps", install.App.Resource, install.App.Key, detail.Version)
|
||||
if install.App.Resource == constant.AppResourceRemote {
|
||||
if upErr = downloadApp(install.App, detail, &install); upErr != nil {
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
_, _ = http.Get(detail.DownloadCallBackUrl)
|
||||
}()
|
||||
}
|
||||
if install.App.Resource == constant.AppResourceLocal {
|
||||
detailDir = path.Join(constant.ResourceDir, "apps", "local", strings.TrimPrefix(install.App.Key, "local"), detail.Version)
|
||||
}
|
||||
@ -462,6 +466,9 @@ func copyData(app model.App, appDetail model.AppDetail, appInstall *model.AppIns
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
go func() {
|
||||
_, _ = http.Get(appDetail.DownloadCallBackUrl)
|
||||
}()
|
||||
}
|
||||
appKey := app.Key
|
||||
installAppDir := path.Join(constant.AppInstallDir, app.Key)
|
||||
|
@ -169,7 +169,8 @@
|
||||
round
|
||||
size="small"
|
||||
:disabled="
|
||||
installed.status !== 'Running' ||
|
||||
(installed.status !== 'Running' &&
|
||||
installed.status !== 'UpgradeErr') ||
|
||||
installed.app.status === 'TakeDown'
|
||||
"
|
||||
@click="openOperate(installed, 'upgrade')"
|
||||
|
Loading…
Reference in New Issue
Block a user