fix build
This commit is contained in:
parent
01aa381848
commit
155aa2580b
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@ -98,14 +98,12 @@ jobs:
|
|||||||
New-Item -Path "nginx/logs/__keep__.txt" -ItemType File -Force
|
New-Item -Path "nginx/logs/__keep__.txt" -ItemType File -Force
|
||||||
Invoke-WebRequest -Uri "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" -OutFile "MoviePilot-Plugins-main.zip"
|
Invoke-WebRequest -Uri "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" -OutFile "MoviePilot-Plugins-main.zip"
|
||||||
Expand-Archive -Path "MoviePilot-Plugins-main.zip" -DestinationPath "MoviePilot-Plugins-main"
|
Expand-Archive -Path "MoviePilot-Plugins-main.zip" -DestinationPath "MoviePilot-Plugins-main"
|
||||||
Move-Item -Path "MoviePilot-Plugins-main/MoviePilot-Plugins-main/plugins/*" -Destination "app/plugins/"
|
Move-Item -Path "MoviePilot-Plugins-main/MoviePilot-Plugins-main/plugins/*" -Destination "app/plugins/" -Force
|
||||||
Remove-Item -Path "MoviePilot-Plugins-main.zip"
|
Remove-Item -Path "MoviePilot-Plugins-main.zip"
|
||||||
Remove-Item -Path "MoviePilot-Plugins-main" -Recurse -Force
|
Remove-Item -Path "MoviePilot-Plugins-main" -Recurse -Force
|
||||||
Invoke-WebRequest -Uri "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" -OutFile "MoviePilot-Resources-main.zip"
|
Invoke-WebRequest -Uri "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" -OutFile "MoviePilot-Resources-main.zip"
|
||||||
Expand-Archive -Path "MoviePilot-Resources-main.zip" -DestinationPath "MoviePilot-Resources-main"
|
Expand-Archive -Path "MoviePilot-Resources-main.zip" -DestinationPath "MoviePilot-Resources-main"
|
||||||
Move-Item -Path "MoviePilot-Resources-main/MoviePilot-Resources-main/resources/*" -Destination "app/helper/"
|
Move-Item -Path "MoviePilot-Resources-main/MoviePilot-Resources-main/resources/*" -Destination "app/helper/" -Force
|
||||||
New-Item -Path "config/sites" -ItemType Directory -Force
|
|
||||||
Move-Item -Path "app/helper/user.sites.bin" -Destination "config/sites/user.sites.bin" -Force
|
|
||||||
Remove-Item -Path "MoviePilot-Resources-main.zip"
|
Remove-Item -Path "MoviePilot-Resources-main.zip"
|
||||||
Remove-Item -Path "MoviePilot-Resources-main" -Recurse -Force
|
Remove-Item -Path "MoviePilot-Resources-main" -Recurse -Force
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
@ -78,13 +78,10 @@ RUN cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
|
|||||||
&& curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/${FRONTEND_VERSION}/dist.zip" | busybox unzip -d / - \
|
&& curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/${FRONTEND_VERSION}/dist.zip" | busybox unzip -d / - \
|
||||||
&& mv /dist /public \
|
&& mv /dist /public \
|
||||||
&& curl -sL "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d / - \
|
&& curl -sL "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d / - \
|
||||||
&& mv /MoviePilot-Plugins-main/plugins/* /app/app/plugins/ \
|
&& mv -f /MoviePilot-Plugins-main/plugins/* /app/app/plugins/ \
|
||||||
&& rm -rf /MoviePilot-Plugins-main \
|
&& rm -rf /MoviePilot-Plugins-main \
|
||||||
&& curl -sL "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" | busybox unzip -d / - \
|
&& curl -sL "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" | busybox unzip -d / - \
|
||||||
&& mv /MoviePilot-Resources-main/resources/* /app/app/helper/ \
|
&& mv -f /MoviePilot-Resources-main/resources/* /app/app/helper/ \
|
||||||
&& rm -f /app/config/user.sites.bin \
|
|
||||||
&& mkdir -p /app/config/sites \
|
|
||||||
&& mv /app/app/helper/user.sites.bin /app/config/sites/user.sites.bin \
|
|
||||||
&& rm -rf /MoviePilot-Resources-main
|
&& rm -rf /MoviePilot-Resources-main
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
VOLUME [ "/config" ]
|
VOLUME [ "/config" ]
|
||||||
|
@ -82,7 +82,9 @@ class PluginHelper(metaclass=Singleton):
|
|||||||
if item.get("download_url"):
|
if item.get("download_url"):
|
||||||
# 下载插件文件
|
# 下载插件文件
|
||||||
res = RequestUtils(proxies=settings.PROXY).get_res(item["download_url"])
|
res = RequestUtils(proxies=settings.PROXY).get_res(item["download_url"])
|
||||||
if not res or res.status_code != 200:
|
if not res:
|
||||||
|
return False, f"文件 {item.get('name')} 下载失败!"
|
||||||
|
elif res.status_code != 200:
|
||||||
return False, f"下载文件 {item.get('name')} 失败:{res.status_code} - {res.reason}"
|
return False, f"下载文件 {item.get('name')} 失败:{res.status_code} - {res.reason}"
|
||||||
# 创建插件文件夹
|
# 创建插件文件夹
|
||||||
file_path = Path(settings.ROOT_PATH) / "app" / item.get("path")
|
file_path = Path(settings.ROOT_PATH) / "app" / item.get("path")
|
||||||
|
6
update
6
update
@ -40,10 +40,8 @@ install_backend_and_download_resources() {
|
|||||||
mv /tmp/App /app
|
mv /tmp/App /app
|
||||||
rm -rf /public
|
rm -rf /public
|
||||||
mv /tmp/dist /public
|
mv /tmp/dist /public
|
||||||
mv /tmp/Plugins/plugins/* /app/app/plugins/
|
mv -f /tmp/Plugins/plugins/* /app/app/plugins/
|
||||||
mv /tmp/Resources/resources/* /app/app/helper/
|
mv -f /tmp/Resources/resources/* /app/app/helper/
|
||||||
mkdir -p /app/config/sites
|
|
||||||
mv /app/app/helper/user.sites.bin /app/config/sites/user.sites.bin
|
|
||||||
rm -rf /tmp/*
|
rm -rf /tmp/*
|
||||||
echo "程序更新成功,前端版本:${frontend_version},后端版本:${1}"
|
echo "程序更新成功,前端版本:${frontend_version},后端版本:${1}"
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user