Browse Source

Handle git ls-remote error codes explicitly

pull/25281/head
maliming 3 weeks ago
parent
commit
06e1d551d2
No known key found for this signature in database GPG Key ID: A646B9CB645ECEA4
  1. 11
      .github/scripts/update_dependency_changes.py

11
.github/scripts/update_dependency_changes.py

@ -32,7 +32,16 @@ def check_tag_exists(tag):
capture_output=True,
text=True,
)
return result.returncode == 0
if result.returncode == 0:
return True
if result.returncode == 2:
return False
stderr = (result.stderr or "").strip()
raise RuntimeError(
f"Failed to check whether git tag '{tag}' exists on remote 'origin' "
f"(exit code {result.returncode}): {stderr or 'No error output provided.'}"
)
def bump_patch_if_released(version, tag_exists_fn=None):

Loading…
Cancel
Save