mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-01-31 22:18:07 +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)
|
&& 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_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 {
|
if err = upAppPre(app, appInstall); err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
go func() {
|
|
||||||
_, _ = http.Get(appDetail.DownloadCallBackUrl)
|
|
||||||
}()
|
|
||||||
upApp(appInstall)
|
upApp(appInstall)
|
||||||
}()
|
}()
|
||||||
go updateToolApp(appInstall)
|
go updateToolApp(appInstall)
|
||||||
|
@ -242,11 +242,15 @@ func upgradeInstall(installId uint, detailId uint) error {
|
|||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
|
|
||||||
|
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 {
|
if upErr = downloadApp(install.App, detail, &install); upErr != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
go func() {
|
||||||
detailDir := path.Join(constant.ResourceDir, "apps", install.App.Resource, install.App.Key, detail.Version)
|
_, _ = http.Get(detail.DownloadCallBackUrl)
|
||||||
|
}()
|
||||||
|
}
|
||||||
if install.App.Resource == constant.AppResourceLocal {
|
if install.App.Resource == constant.AppResourceLocal {
|
||||||
detailDir = path.Join(constant.ResourceDir, "apps", "local", strings.TrimPrefix(install.App.Key, "local"), detail.Version)
|
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 {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
go func() {
|
||||||
|
_, _ = http.Get(appDetail.DownloadCallBackUrl)
|
||||||
|
}()
|
||||||
}
|
}
|
||||||
appKey := app.Key
|
appKey := app.Key
|
||||||
installAppDir := path.Join(constant.AppInstallDir, app.Key)
|
installAppDir := path.Join(constant.AppInstallDir, app.Key)
|
||||||
|
@ -169,7 +169,8 @@
|
|||||||
round
|
round
|
||||||
size="small"
|
size="small"
|
||||||
:disabled="
|
:disabled="
|
||||||
installed.status !== 'Running' ||
|
(installed.status !== 'Running' &&
|
||||||
|
installed.status !== 'UpgradeErr') ||
|
||||||
installed.app.status === 'TakeDown'
|
installed.app.status === 'TakeDown'
|
||||||
"
|
"
|
||||||
@click="openOperate(installed, 'upgrade')"
|
@click="openOperate(installed, 'upgrade')"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user