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:
Adam Warner 2022-11-14 22:09:26 +00:00
parent cdbe4c9b86
commit ba74051502
No known key found for this signature in database
GPG key ID: 872950F3ECF2B173
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ function get_remote_version() {
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
@ -113,7 +113,7 @@ addOrEditKeyValPair "${VERSION_FILE}" "FTL_VERSION" "${FTL_VERSION}"
FTL_BRANCH="$(pihole-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}"
GITHUB_FTL_VERSION="$(get_remote_version FTL)"