feat(version): apply semver-based version sorting to glob and add master fallback
Publish to PyPI / build-and-publish (push) Has been cancelled
Python Linting / Run Ruff (push) Has been cancelled

- Apply PR #2334 changes to glob/manager_core.py (was only in legacy)
- Add master branch fallback when remote/HEAD reference is unavailable
This commit is contained in:
Dr.Lt.Data
2025-12-15 03:39:13 +09:00
parent 952613c07b
commit 2779c66b39
2 changed files with 85 additions and 31 deletions
+7 -2
View File
@@ -3297,7 +3297,7 @@ def get_comfyui_versions(repo=None):
try:
remote_name = get_remote_name(repo)
repo.remotes[remote_name].fetch()
except:
except Exception:
logging.error("[ComfyUI-Manager] Failed to fetch ComfyUI")
def parse_semver(tag_name):
@@ -3338,7 +3338,12 @@ def get_comfyui_versions(repo=None):
default_commit = default_head_ref.reference.commit
head_is_default = repo.head.commit == default_commit
except Exception:
head_is_default = False
# Fallback: compare directly with master branch
try:
if 'master' in [h.name for h in repo.heads]:
head_is_default = repo.head.commit == repo.heads.master.commit
except Exception:
head_is_default = False
nearest_semver = normalize_describe(described)
exact_semver = exact_tag if parse_semver(exact_tag) else None