mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-15 19:44:29 +05:00
fix(klipper): if set, use custom branch to check for update (#332)
This commit is contained in:
@@ -590,8 +590,14 @@ function get_remote_klipper_commit() {
|
|||||||
[[ ! -d ${KLIPPER_DIR} || ! -d "${KLIPPER_DIR}/.git" ]] && return
|
[[ ! -d ${KLIPPER_DIR} || ! -d "${KLIPPER_DIR}/.git" ]] && return
|
||||||
|
|
||||||
local commit
|
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
|
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}"
|
echo "${commit}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user