Browse Source
Handle git ls-remote error codes explicitly
pull/25281/head
maliming
3 weeks ago
No known key found for this signature in database
GPG Key ID: A646B9CB645ECEA4
1 changed files with
10 additions and
1 deletions
-
.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): |
|
|
|
|