We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66c7ca0 commit 41a45b1Copy full SHA for 41a45b1
1 file changed
dev.sh
@@ -0,0 +1,24 @@
1
+#!/bin/bash
2
+# 更新环境
3
+apt update
4
+# 安装 Git
5
+apt install -y git curl
6
+# 更新后端代码
7
+cd /
8
+rm -rf /app
9
+git clone https://github.com/jxxghp/MoviePilot app
10
+pip install -r /app/requirements.txt
11
+echo "后端程序更新成功"
12
+# 检查前端最新版本
13
+frontend_version=$(curl ${CURL_OPTIONS} "https://api.github.com/repos/jxxghp/MoviePilot-Frontend/releases/latest" | jq -r .tag_name)
14
+# 更新前端代码
15
+echo "正在下载前端程序 ${frontend_version}..."
16
+curl -sL "https://github.com/jxxghp/MoviePilot-Frontend/releases/download/${frontend_version}/dist.zip" | busybox unzip -d /tmp -
17
+if [ $? -eq 0 ]; then
18
+ rm -rf /public
19
+ mv /tmp/dist /public
20
+ echo "程序更新成功,前端版本:${frontend_version}"
21
+else
22
+ echo "前端程序下载失败"
23
+fi
24
+echo "请重启容器生效"
0 commit comments