Skip to content

Commit aa217f1

Browse files
committed
Update GitHub generated Download URL for maximum compatibility #157
Signed-off-by: tdruez <tdruez@nexb.com>
1 parent b744d07 commit aa217f1

4 files changed

Lines changed: 10 additions & 3 deletions

File tree

CHANGELOG.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ Changelog
44
0.16.0 (unreleased)
55
-------------------
66

7+
0.15.2 (2024-07-04)
8+
-------------------
9+
10+
- Update GitHub generated Download URL for maximum compatibility.
11+
https://github.com/package-url/packageurl-python/issues/157
12+
713
0.15.1 (2024-06-13)
814
-------------------
915

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = packageurl-python
3-
version = 0.15.1
3+
version = 0.15.2
44
license = MIT
55
description = A purl aka. Package URL parser and builder
66
long_description = file:README.rst

src/packageurl/contrib/purl2url.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def get_repo_download_url_by_package_type(
4040
raise ValueError("Only zip and tar.gz extensions are supported")
4141

4242
download_url_by_type = {
43-
"github": f"https://github.com/{namespace}/{name}/archive/refs/tags/{version}.{archive_extension}",
43+
"github": f"https://github.com/{namespace}/{name}/archive/{version}.{archive_extension}",
4444
"bitbucket": f"https://bitbucket.org/{namespace}/{name}/get/{version}.{archive_extension}",
4545
"gitlab": f"https://gitlab.com/{namespace}/{name}/-/archive/{version}/{name}-{version}.{archive_extension}",
4646
}

tests/contrib/test_purl2url.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ def test_purl2url_get_download_url():
7878
"pkg:npm/is-npm@1.0.0": "http://registry.npmjs.org/is-npm/-/is-npm-1.0.0.tgz",
7979
"pkg:hackage/cli-extras@0.2.0.0": "https://hackage.haskell.org/package/cli-extras-0.2.0.0/cli-extras-0.2.0.0.tar.gz",
8080
"pkg:nuget/System.Text.Json@6.0.6": "https://www.nuget.org/api/v2/package/System.Text.Json/6.0.6",
81-
"pkg:github/nexb/scancode-toolkit@3.1.1?version_prefix=v": "https://github.com/nexb/scancode-toolkit/archive/refs/tags/v3.1.1.tar.gz",
81+
"pkg:github/nexb/scancode-toolkit@3.1.1?version_prefix=v": "https://github.com/nexb/scancode-toolkit/archive/v3.1.1.tar.gz",
82+
"pkg:github/StonyShi/reactor-netty-jersey@ac525d91ff1724395640531df08e3e4eabef207d": "https://github.com/stonyshi/reactor-netty-jersey/archive/ac525d91ff1724395640531df08e3e4eabef207d.tar.gz",
8283
"pkg:bitbucket/robeden/trove@3.0.3": "https://bitbucket.org/robeden/trove/get/3.0.3.tar.gz",
8384
"pkg:bitbucket/robeden/trove@3.0.3?version_prefix=v": "https://bitbucket.org/robeden/trove/get/v3.0.3.tar.gz",
8485
"pkg:gitlab/tg1999/firebase@1a122122": "https://gitlab.com/tg1999/firebase/-/archive/1a122122/firebase-1a122122.tar.gz",

0 commit comments

Comments
 (0)