mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Grab local FTL hash correctly from FTL's own version output, and grab one digit less for remote hashes (also in debug log)
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
cdbe4c9b86
commit
ba74051502
@ -314,9 +314,9 @@ check_ftl_version() {
|
|||||||
local FTL_VERSION FTL_COMMIT FTL_BRANCH
|
local FTL_VERSION FTL_COMMIT FTL_BRANCH
|
||||||
echo_current_diagnostic "FTL version"
|
echo_current_diagnostic "FTL version"
|
||||||
# Use the built in command to check FTL's version
|
# Use the built in command to check FTL's version
|
||||||
FTL_VERSION=$(pihole-FTL -vv | grep -m 1 Version | awk '{printf $2}')
|
FTL_VERSION=$(pihole-FTL version)
|
||||||
FTL_BRANCH=$(pihole-FTL -vv | grep -m 1 Branch | awk '{printf $2}')
|
FTL_BRANCH=$(pihole-FTL branch)
|
||||||
FTL_COMMIT=$(pihole-FTL -vv | grep -m 1 Commit | awk '{printf $2}')
|
FTL_COMMIT=$(pihole-FTL --hash)
|
||||||
|
|
||||||
|
|
||||||
log_write "${TICK} Version: ${FTL_VERSION}"
|
log_write "${TICK} Version: ${FTL_VERSION}"
|
||||||
|
@ -31,7 +31,7 @@ function get_remote_version() {
|
|||||||
|
|
||||||
|
|
||||||
function get_remote_hash(){
|
function get_remote_hash(){
|
||||||
git ls-remote "https://github.com/pi-hole/${1}" --tags "${2}" | awk '{print substr($0, 0,9);}' || return 1
|
git ls-remote "https://github.com/pi-hole/${1}" --tags "${2}" | awk '{print substr($0, 0,8);}' || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Source the setupvars config file
|
# Source the setupvars config file
|
||||||
@ -113,7 +113,7 @@ addOrEditKeyValPair "${VERSION_FILE}" "FTL_VERSION" "${FTL_VERSION}"
|
|||||||
FTL_BRANCH="$(pihole-FTL branch)"
|
FTL_BRANCH="$(pihole-FTL branch)"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "FTL_BRANCH" "${FTL_BRANCH}"
|
addOrEditKeyValPair "${VERSION_FILE}" "FTL_BRANCH" "${FTL_BRANCH}"
|
||||||
|
|
||||||
FTL_HASH="$(pihole-FTL -v | cut -d "-" -f2)"
|
FTL_HASH="$(pihole-FTL --hash)"
|
||||||
addOrEditKeyValPair "${VERSION_FILE}" "FTL_HASH" "${FTL_HASH}"
|
addOrEditKeyValPair "${VERSION_FILE}" "FTL_HASH" "${FTL_HASH}"
|
||||||
|
|
||||||
GITHUB_FTL_VERSION="$(get_remote_version FTL)"
|
GITHUB_FTL_VERSION="$(get_remote_version FTL)"
|
||||||
|
Loading…
Reference in New Issue
Block a user