Browse Source

Merge pull request #25283 from abpframework/auto-merge/rel-10-3/4505

Merge branch dev with rel-10.3
pull/25284/head
Volosoft Agent 3 weeks ago
committed by GitHub
parent
commit
fdc6d309d3
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 15
      .github/scripts/update_dependency_changes.py
  2. 6
      .github/workflows/nuget-packages-version-change-detector.yml

15
.github/scripts/update_dependency_changes.py

@ -26,13 +26,22 @@ def normalize_version(version):
def check_tag_exists(tag): def check_tag_exists(tag):
"""Check if a git tag exists.""" """Check if a git tag exists on the remote."""
result = subprocess.run( result = subprocess.run(
["git", "tag", "-l", tag], ["git", "ls-remote", "--exit-code", "--tags", "origin", f"refs/tags/{tag}"],
capture_output=True, capture_output=True,
text=True, text=True,
) )
return result.returncode == 0 and tag in result.stdout.strip().split("\n") 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): def bump_patch_if_released(version, tag_exists_fn=None):

6
.github/workflows/nuget-packages-version-change-detector.yml

@ -44,10 +44,8 @@ jobs:
ref: ${{ github.event.pull_request.head.ref }} ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 1 fetch-depth: 1
- name: Fetch base branch and tags - name: Fetch base branch
run: | run: git fetch origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }} --depth=1
git fetch origin ${{ github.event.pull_request.base.ref }}:refs/remotes/origin/${{ github.event.pull_request.base.ref }} --depth=1
git fetch --tags origin
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with:

Loading…
Cancel
Save