mirror of
https://github.com/raspberrypi/rpi-update.git
synced 2026-01-20 21:13:38 +08:00
rpi-update: Extract git hash from artifact build from branch
This allows rpi-update rpi-6.6.y to correctly skip if no changes or run if there are changes. See: https://forums.raspberrypi.com/viewtopic.php?p=2138683#p2138683
This commit is contained in:
@@ -682,6 +682,8 @@ if [[ "${FW_REV}" == "" ]]; then
|
||||
if [[ "${ARTIFACT}" == pulls/* ]]; then
|
||||
PULL=${ARTIFACT##*/}
|
||||
ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/pulls/${PULL}" | awk '/"sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}')
|
||||
else
|
||||
ARTIFACT=$(eval curl -s "https://api.github.com/repos/raspberrypi/linux/actions/artifacts" | grep -A1 "\"head_branch\": \"${FW_REV_IN}\"" | awk '/"head_sha":/ {gsub(/"/, "", $2); gsub(/,/, "", $2); print $2; exit}')
|
||||
fi
|
||||
else
|
||||
ARTIFACT=${FW_REV_IN}
|
||||
|
||||
Reference in New Issue
Block a user