Skip to content

Commit

Permalink
Add newer IPP-CP versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
J08nY committed Feb 24, 2025
1 parent 822c5a9 commit 7eada02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
12 changes: 9 additions & 3 deletions nix/fetch_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,14 @@ def fetch_ippcp():
versions = {}
for release in resp.json():
if not release['draft'] and not release['prerelease']:
version = release['tag_name'].split('_')[1]
flat_version = "v" + version.replace('.', '_')
if "_" in release["tag_name"]:
version = release['tag_name'].split('_')[1]
flat_version = "v" + version.replace('.', '_')
else:
version = release["tag_name"]
flat_version = version.replace('.', '_')
parsed = parse_version(version.replace("u", "+u"))

download_url = f"https://github.com/{owner}/{repo}/archive/{release['tag_name']}.tar.gz"
digest = get_source_hash(download_url, unpack=True)
print(f"{version}:{digest}")
Expand All @@ -310,7 +316,7 @@ def fetch_ippcp():
versions[flat_version] = {
"version": version,
"hash": digest,
"sort": parse_version(version.replace("u", "+u"))
"sort": (1, parsed) if parsed.major < 2000 else (0, parsed)
}
serialize_versions(pkg, renders, versions)

Expand Down
8 changes: 8 additions & 0 deletions nix/ippcp_pkg_versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
{
"v1_0_1": {
"version": "v1.0.1",
"hash": "sha256-C8Leh892xaaLS94u3X6d9dedoYDt5Pmbkpxpfd1AQvg="
},
"v1_0_0": {
"version": "v1.0.0",
"hash": "sha256-LEew4xtMZazUQFvWBeDyhLFKZzU1nW5+/H9BDfJJbOY="
},
"v2021_12_1": {
"version": "2021.12.1",
"hash": "sha256-voxjx9Np/8jy9XS6EvUK4aW18/DGQGaPpTKm9RzuCU8="
Expand Down

0 comments on commit 7eada02

Please sign in to comment.