From 932ada2c6f5541bd46e30785818868178d124601 Mon Sep 17 00:00:00 2001 From: yungwine Date: Fri, 16 Aug 2024 12:17:02 +0900 Subject: [PATCH] fix update commit --- mytonctrl/mytonctrl.py | 2 +- mytonctrl/scripts/update.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mytonctrl/mytonctrl.py b/mytonctrl/mytonctrl.py index 53b8c158..da433fff 100755 --- a/mytonctrl/mytonctrl.py +++ b/mytonctrl/mytonctrl.py @@ -334,7 +334,7 @@ def check_git(input_args, default_repo, text, default_branch='master'): #end define def check_branch_exists(author, repo, branch): - if is_hex(branch): + if len(branch) >= 6 and is_hex(branch): print('Hex name detected, skip branch existence check.') return url = f"https://github.com/{author}/{repo}.git" diff --git a/mytonctrl/scripts/update.sh b/mytonctrl/scripts/update.sh index 463d422c..8bd4ecd9 100644 --- a/mytonctrl/scripts/update.sh +++ b/mytonctrl/scripts/update.sh @@ -37,8 +37,8 @@ pip3 uninstall -y mytonctrl # Update code echo "https://github.com/${author}/${repo}.git -> ${branch}" -git clone --branch ${branch} --recursive https://github.com/${author}/${repo}.git -cd ${repo} +git clone --recursive https://github.com/${author}/${repo}.git +cd ${repo} && git checkout ${branch} pip3 install -U . systemctl daemon-reload