mirror of
https://github.com/dw-0/kiauh.git
synced 2025-12-14 11:04:29 +05:00
fix remote version checks
This commit is contained in:
@@ -104,7 +104,7 @@ read_branch(){
|
|||||||
#if reading the branch gives an empty string
|
#if reading the branch gives an empty string
|
||||||
#we are on non-detached HEAD state on origin/master
|
#we are on non-detached HEAD state on origin/master
|
||||||
#and need to set GET_BRANCH to make a non-empty string
|
#and need to set GET_BRANCH to make a non-empty string
|
||||||
if [ -z $GET_BRANCH ]; then
|
if [ -z "$GET_BRANCH" ]; then
|
||||||
GET_BRANCH="origin/master"
|
GET_BRANCH="origin/master"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@@ -140,7 +140,12 @@ read_local_klipper_commit(){
|
|||||||
|
|
||||||
read_remote_klipper_commit(){
|
read_remote_klipper_commit(){
|
||||||
read_branch
|
read_branch
|
||||||
if [ ! -z $GET_BRANCH ];then
|
if [ ! -z "$GET_BRANCH" ];then
|
||||||
|
if [ "$GET_BRANCH" == "origin/master" ]; then
|
||||||
|
git fetch origin master -q
|
||||||
|
else
|
||||||
|
git fetch $GET_BRANCH -q
|
||||||
|
fi
|
||||||
REMOTE_COMMIT=$(git rev-parse --short=8 $GET_BRANCH)
|
REMOTE_COMMIT=$(git rev-parse --short=8 $GET_BRANCH)
|
||||||
else
|
else
|
||||||
REMOTE_COMMIT=""
|
REMOTE_COMMIT=""
|
||||||
@@ -164,6 +169,7 @@ compare_klipper_versions(){
|
|||||||
read_dwc2fk_versions(){
|
read_dwc2fk_versions(){
|
||||||
if [ -d $DWC2FK_DIR ] && [ -d $DWC2FK_DIR/.git ]; then
|
if [ -d $DWC2FK_DIR ] && [ -d $DWC2FK_DIR/.git ]; then
|
||||||
cd $DWC2FK_DIR
|
cd $DWC2FK_DIR
|
||||||
|
git fetch origin master -q
|
||||||
LOCAL_DWC2FK_COMMIT=$(git rev-parse --short=8 HEAD)
|
LOCAL_DWC2FK_COMMIT=$(git rev-parse --short=8 HEAD)
|
||||||
REMOTE_DWC2FK_COMMIT=$(git rev-parse --short=8 origin/master)
|
REMOTE_DWC2FK_COMMIT=$(git rev-parse --short=8 origin/master)
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user