fix release repository lookup

This commit is contained in:
xopenwrt 2026-06-29 21:49:49 +08:00
parent 66269d4895
commit 68666506d0
2 changed files with 15 additions and 2 deletions

View File

@ -0,0 +1,12 @@
# AI Modification Log: Release Repository Selection
Date: 2026-06-29
## Change
- Updated `Scripts/AutoBuild_Upcheck.sh` to use `${GITHUB_REPOSITORY}` for release history and previous package-version downloads.
- Kept `X-OpenWrt/X-OpenWrt-Dev` as a fallback when the script is run outside GitHub Actions.
## Reason
The workflows upload releases to the current repository, but the update checker fetched release history and previous logs from a hard-coded repository. Using `${GITHUB_REPOSITORY}` keeps the checker aligned with the workflow repository.

View File

@ -94,7 +94,8 @@ done < "build_package.log"
# export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}} # export NOW_DATA_VERSION=${{env.NOW_DATA_VERSION}}
# export GITHUB_WORKSPACE=$GITHUB_WORKSPACE # export GITHUB_WORKSPACE=$GITHUB_WORKSPACE
wget https://api.github.com/repos/X-OpenWrt/X-OpenWrt-Dev/releases -O releases.json RELEASE_REPOSITORY="${GITHUB_REPOSITORY:-X-OpenWrt/X-OpenWrt-Dev}"
wget "https://api.github.com/repos/${RELEASE_REPOSITORY}/releases" -O releases.json
cat releases.json | jq '.[].tag_name' -r > version.old cat releases.json | jq '.[].tag_name' -r > version.old
echo ${NOW_DATA_VERSION} echo ${NOW_DATA_VERSION}
diff_version=v2023-1-1 diff_version=v2023-1-1
@ -111,7 +112,7 @@ do
fi fi
fi fi
done < "version.old" done < "version.old"
wget -O ${1}_build_pkg_ver_old.log https://github.com/X-OpenWrt/X-OpenWrt-Dev/releases/download/${diff_version}/${1}_build_pkg_ver.log wget -O ${1}_build_pkg_ver_old.log "https://github.com/${RELEASE_REPOSITORY}/releases/download/${diff_version}/${1}_build_pkg_ver.log"
# Check_build_Version "LINUX_VERSION=${X_LINUX_VERSION}" ${1} # Check_build_Version "LINUX_VERSION=${X_LINUX_VERSION}" ${1}
echo "Tag:${1} Vesion Check" >> ${1}_build_pkg_up.log echo "Tag:${1} Vesion Check" >> ${1}_build_pkg_up.log