fix: correct version check to compare against current branch
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user