From 82289438509a4a4dc5b1d7e55d30d38904829e39 Mon Sep 17 00:00:00 2001 From: Jookia Date: Sun, 16 Apr 2023 16:56:18 +1000 Subject: [PATCH] fix(klipper): if set, use custom branch to check for update (#332) --- scripts/klipper.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/klipper.sh b/scripts/klipper.sh index 27483cb..66126b4 100644 --- a/scripts/klipper.sh +++ b/scripts/klipper.sh @@ -590,8 +590,14 @@ function get_remote_klipper_commit() { [[ ! -d ${KLIPPER_DIR} || ! -d "${KLIPPER_DIR}/.git" ]] && return local commit + local branch + + read_kiauh_ini "${FUNCNAME[0]}" + branch="${custom_klipper_repo_branch}" + [[ -z ${branch} ]] && branch="master" + cd "${KLIPPER_DIR}" && git fetch origin -q - commit=$(git describe origin/master --always --tags | cut -d "-" -f 1,2) + commit=$(git describe "origin/${branch}" --always --tags | cut -d "-" -f 1,2) echo "${commit}" }