feat 拆分资源包
This commit is contained in:
parent
a0afd86b6a
commit
dbba7fc92a
9
.github/workflows/build.yml
vendored
9
.github/workflows/build.yml
vendored
@ -98,9 +98,16 @@ jobs:
|
||||
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"
|
||||
Expand-Archive -Path "MoviePilot-Plugins-main.zip" -DestinationPath "MoviePilot-Plugins-main"
|
||||
Move-Item -Path "MoviePilot-Plugins-main/MoviePilot-Plugins-main/plugins/*" -Destination "plugins/"
|
||||
Move-Item -Path "MoviePilot-Plugins-main/MoviePilot-Plugins-main/plugins/*" -Destination "app/plugins/"
|
||||
Remove-Item -Path "MoviePilot-Plugins-main.zip"
|
||||
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"
|
||||
Expand-Archive -Path "MoviePilot-Resources-main.zip" -DestinationPath "MoviePilot-Resources-main"
|
||||
Move-Item -Path "MoviePilot-Resources-main/MoviePilot-Resources-main/resources/*" -Destination "app/helper/"
|
||||
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" -Recurse -Force
|
||||
shell: pwsh
|
||||
|
||||
- name: Pyinstaller
|
||||
|
@ -79,7 +79,13 @@ RUN cp -f /app/nginx.conf /etc/nginx/nginx.template.conf \
|
||||
&& mv /dist /public \
|
||||
&& curl -sL "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d / - \
|
||||
&& mv /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 / - \
|
||||
&& mv /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
|
||||
EXPOSE 3000
|
||||
VOLUME [ "/config" ]
|
||||
ENTRYPOINT [ "/entrypoint" ]
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because one or more lines are too long
7
update
7
update
@ -24,6 +24,10 @@ if [ "${MOVIEPILOT_AUTO_UPDATE_DEV}" = "true" ]; then
|
||||
echo "正在下载插件..."
|
||||
curl ${CURL_OPTIONS} "https://github.com/jxxghp/MoviePilot-Plugins/archive/refs/heads/main.zip" | busybox unzip -d /tmp -
|
||||
echo "插件下载成功"
|
||||
# 下载资源
|
||||
echo "正在下载资源包..."
|
||||
curl ${CURL_OPTIONS} "https://github.com/jxxghp/MoviePilot-Resources/archive/refs/heads/main.zip" | busybox unzip -d /tmp -
|
||||
echo "资源包下载成功"
|
||||
# 检查前端最新版本
|
||||
frontend_version=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases/latest" | jq -r .tag_name)
|
||||
if [[ "${frontend_version}" == *v* ]]; then
|
||||
@ -36,6 +40,9 @@ if [ "${MOVIEPILOT_AUTO_UPDATE_DEV}" = "true" ]; then
|
||||
rm -rf /public
|
||||
mv /tmp/dist /public
|
||||
mv /tmp/MoviePilot-Plugins-main/plugins/* /app/app/plugins/
|
||||
mv /tmp/MoviePilot-Resources-main/resources/* /app/app/helper/
|
||||
mv /app/app/helper/user.sites.bin /app/config/sites/user.sites.bin
|
||||
rm -rf /tmp MoviePilot-*
|
||||
echo "程序更新成功,前端版本:${frontend_version}"
|
||||
else
|
||||
echo "前端程序下载失败,继续使用旧的程序来启动..."
|
||||
|
Loading…
x
Reference in New Issue
Block a user