Skip to content

Commit

Permalink
Merge 6faaa82 into b2b2086
Browse files Browse the repository at this point in the history
  • Loading branch information
wjt committed Aug 8, 2022
2 parents b2b2086 + 6faaa82 commit cba35ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ and add a template for source download URL.
"url-template": "https://github.com/flatpak/flatpak/releases/download/$version/flatpak-$version.tar.xz"
}
```
Set `stable-only` to `true` to retrieve latest stable version (as recognized by Anitya).

Set `stable-only` to `false` to include unstable releases (as recognized by Anitya).

The [`versions`](#version-constraining) property is supported.

Expand Down
2 changes: 1 addition & 1 deletion src/checkers/anityachecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ async def check(self, external_data: ExternalBase):
"baseurl", "https://release-monitoring.org"
)
versions_url = URL(instance_url) / "api/v2/versions/"
stable_only = external_data.checker_data.get("stable-only", False)
stable_only = external_data.checker_data.get("stable-only", True)
constraints = external_data.checker_data.get("versions", {}).items()

query = {"project_id": external_data.checker_data["project-id"]}
Expand Down
2 changes: 1 addition & 1 deletion src/checkers/pypichecker.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ async def check(self, external_data: ExternalBase):
(o, Version(v))
for o, v in external_data.checker_data.get("versions", {}).items()
]
stable_only = external_data.checker_data.get("stable-only", False)
stable_only = external_data.checker_data.get("stable-only", True)

async with self.session.get(f"{PYPI_INDEX}/{package_name}/json") as response:
pypi_data = await response.json()
Expand Down
2 changes: 2 additions & 0 deletions tests/org.flatpak.Flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ modules:
x-checker-data:
type: anitya
project-id: 6377
stable-only: false
versions:
==: "1.10.1"
url-template: https://github.com/flatpak/flatpak/releases/download/$version/flatpak-$version.tar.xz
Expand All @@ -43,6 +44,7 @@ modules:
x-checker-data:
type: anitya
project-id: 1157
# Leaving stable-only unset to at least exercise the default path
url-template: https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs$version0$version1$version2/ghostscript-$version.tar.xz

- name: gnuradio-iqbal
Expand Down

0 comments on commit cba35ed

Please sign in to comment.