Skip to content

Commit 28f47fc

Browse files
authored
Merge pull request #331 from yungwine/dev
fix update commit
2 parents 5b06eb2 + 8c246c0 commit 28f47fc

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

mytonctrl/mytonctrl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ def check_git(input_args, default_repo, text, default_branch='master'):
304304
#end define
305305

306306
def check_branch_exists(author, repo, branch):
307-
if is_hex(branch):
307+
if len(branch) >= 6 and is_hex(branch):
308308
print('Hex name detected, skip branch existence check.')
309309
return
310310
url = f"https://github.com/{author}/{repo}.git"

mytonctrl/scripts/update.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ pip3 uninstall -y mytonctrl
3737

3838
# Update code
3939
echo "https://github.com/${author}/${repo}.git -> ${branch}"
40-
git clone --branch ${branch} --recursive https://github.com/${author}/${repo}.git
41-
cd ${repo}
40+
git clone --recursive https://github.com/${author}/${repo}.git
41+
cd ${repo} && git checkout ${branch}
4242
pip3 install -U .
4343

4444
systemctl daemon-reload

0 commit comments

Comments
 (0)