⚗️ Try to fix the build error in CI
This commit is contained in:
1 parent
579bfccb2c
commit
4e00d20f3e
1 file changed
+5
-2
@@ -149,9 +149,12 @@ def _get_dirty():
|
||||
|
||||
|
||||
def _get_distance(ref):
|
||||
distance = _git("rev-list", f"{ref}..HEAD", "--count")
|
||||
if distance is None:
|
||||
return None
|
||||
try:
|
||||
return int(_git("rev-list", "--count", "HEAD", f"^{ref}"))
|
||||
except ValueError:
|
||||
return int(distance)
|
||||
except Exception:
|
||||
return None
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user