fix: correct version check to compare against current branch

This commit is contained in:
Capybara-z
2025-06-13 22:54:25 +03:00
parent a9821aced7
commit a93855e1a6
+5 -1
View File
@@ -23,6 +23,10 @@ def get_git_commit_number() -> str:
repo_url = "https://github.com/Vladless/Solo_bot"
try:
current_branch = subprocess.check_output(
["git", "rev-parse", "--abbrev-ref", "HEAD"]
).decode().strip()
local_number = subprocess.check_output(
["git", "rev-list", "--count", "HEAD"]
).decode().strip()
@@ -35,7 +39,7 @@ def get_git_commit_number() -> str:
try:
remote_commit = subprocess.check_output(
["git", "ls-remote", "origin", "refs/heads/dev"]
["git", "ls-remote", "origin", f"refs/heads/{current_branch}"]
).decode()
remote_hash = remote_commit.split()[0]