From b7ef33fd545387de13f23849fb3a23c9d2fe1a7e Mon Sep 17 00:00:00 2001 From: nico Date: Mon, 25 Mar 2024 23:45:25 +0100 Subject: [PATCH 1/2] git reset before pull --- 70.sh | 2 -- functions.sh | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/70.sh b/70.sh index cf8b70b..90dde6f 100755 --- a/70.sh +++ b/70.sh @@ -41,6 +41,4 @@ cd ${SD70_DIR}/kohya_ss echo LAUNCHING KOHYA_SS ! CMD="python kohya_gui.py"; while IFS= read -r param; do if [[ $param != \#* ]]; then CMD+=" ${param}"; fi; done < "${SD70_DIR}/parameters.txt"; eval $CMD - - wait 99999 \ No newline at end of file diff --git a/functions.sh b/functions.sh index a336e5f..81ff2a0 100644 --- a/functions.sh +++ b/functions.sh @@ -47,6 +47,7 @@ sed 's/\// /g') | cut -f1) ]; then echo "Remote branch is ahead. Wiping venv for clean packages install" fi export active_clean=1 + git reset --hard HEAD git pull -X ours fi } \ No newline at end of file From af84bededc24ca457197ca5abdc453328b1d9fa8 Mon Sep 17 00:00:00 2001 From: nico Date: Tue, 26 Mar 2024 21:11:43 +0100 Subject: [PATCH 2/2] remove auto clean venv when updating --- functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/functions.sh b/functions.sh index 81ff2a0..b66b2a0 100644 --- a/functions.sh +++ b/functions.sh @@ -43,10 +43,11 @@ sed 's/\// /g') | cut -f1) ]; then else if [ "$CLEAN_ENV" = "true" ]; then echo "Forced wiping venv for clean packages install" + export active_clean=1 else - echo "Remote branch is ahead. Wiping venv for clean packages install" + echo "Remote branch is ahead. If you encouter any issue after upgrade, try to clean venv for clean packages install" fi - export active_clean=1 + git reset --hard HEAD git pull -X ours fi