Skip to content

Commit

Permalink
Merge pull request #141 from DDS-Derek/main
Browse files Browse the repository at this point in the history
  • Loading branch information
jxxghp authored Aug 16, 2023
2 parents 8828447 + 4039724 commit d43a5aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions update
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ old_version=$(cat /app/version.py)
if [[ "${old_version}" == *APP_VERSION* ]]; then
current_version=v$(echo ${old_version} | sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
echo "当前版本号:${current_version}"
new_version=$(curl -sL "${GITHUBUSERCONTENT_URL}/jxxghp/MoviePilot/main/version.py")
if [[ "${new_version}" == *APP_VERSION* ]]; then
release_version=v$(echo ${new_version} | sed -ne "s/APP_VERSION\s=\s'v\(.*\)'/\1/gp")
new_version=$(curl -s "https://api.github.com/repos/jxxghp/MoviePilot/releases/latest" | jq -r .tag_name)
if [[ "${new_version}" == *v* ]]; then
release_version=${new_version}
echo "最新版本号:${release_version}"
if [ "${old_version}" != "${new_version}" ]; then
if [ "${current_version}" != "${release_version}" ]; then
echo "发现新版本,开始更新程序..."
curl -sL "${GITHUB_URL}/jxxghp/MoviePilot/archive/refs/tags/${release_version}.zip" | busybox unzip -d /tmp -
if [ $? -eq 0 ]; then
Expand Down

0 comments on commit d43a5aa

Please sign in to comment.