ccproxy.utils.version_checker¶
ccproxy.utils.version_checker
¶
Version checking utilities for ccproxy.
fetch_latest_github_version
async
¶
Fetch the latest version from GitHub releases API.
Returns:
| Type | Description |
|---|---|
str | None
|
Latest version string or None if unable to fetch |
Source code in ccproxy/utils/version_checker.py
get_current_version
¶
extract_commit_from_version
¶
Extract a git commit SHA from a setuptools-scm formatted version.
Source code in ccproxy/utils/version_checker.py
commit_refs_match
¶
Return True when two commit references identify the same commit.
Source code in ccproxy/utils/version_checker.py
get_branch_override
¶
Return branch override from environment if provided.
compare_versions
¶
Compare version strings to determine if an update is available.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
current
|
str
|
Current version string |
required |
latest
|
str
|
Latest version string |
required |
Returns:
| Type | Description |
|---|---|
bool
|
True if latest version is newer than current |
Source code in ccproxy/utils/version_checker.py
fetch_latest_branch_commit
async
¶
Fetch the latest commit SHA for a given branch from GitHub.
Source code in ccproxy/utils/version_checker.py
fetch_branch_names_for_commit
async
¶
Fetch branch names for which the given commit is the HEAD.
Source code in ccproxy/utils/version_checker.py
resolve_branch_for_commit
async
¶
Resolve the branch name associated with the provided commit hash.
Source code in ccproxy/utils/version_checker.py
load_check_state
async
¶
Load version check state from file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to state file |
required |
Returns:
| Type | Description |
|---|---|
VersionCheckState | None
|
VersionCheckState if file exists and is valid, None otherwise |
Source code in ccproxy/utils/version_checker.py
save_check_state
async
¶
Save version check state to file.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
path
|
Path
|
Path to state file |
required |
state
|
VersionCheckState
|
VersionCheckState to save |
required |