mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-23 07:18:07 +00:00
Merge pull request #3137 from pi-hole/tweak/apilatest
Change to use API instead of the Location Header
This commit is contained in:
commit
082cfb2f1c
@ -2229,7 +2229,7 @@ FTLinstall() {
|
|||||||
printf " %b %s..." "${INFO}" "${str}"
|
printf " %b %s..." "${INFO}" "${str}"
|
||||||
|
|
||||||
# Find the latest version tag for FTL
|
# Find the latest version tag for FTL
|
||||||
latesttag=$(curl -sI https://github.com/pi-hole/FTL/releases/latest | grep "Location" | awk -F '/' '{print $NF}')
|
latesttag=$(curl --silent "https://api.github.com/repos/pi-hole/ftl/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
|
||||||
# Tags should always start with v, check for that.
|
# Tags should always start with v, check for that.
|
||||||
if [[ ! "${latesttag}" == v* ]]; then
|
if [[ ! "${latesttag}" == v* ]]; then
|
||||||
printf "%b %b %s\\n" "${OVER}" "${CROSS}" "${str}"
|
printf "%b %b %s\\n" "${OVER}" "${CROSS}" "${str}"
|
||||||
|
Loading…
Reference in New Issue
Block a user