Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Firefox major version support (#668) #675

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mozdownload/scraper.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def thunderbird_latest_version_filter(x):


def latest_version_filter(version, application):
if application == "firefox" and version.isnumeric():
return fr'^{version}(\.\d+)+(-candidates)?$'
if application == "thunderbird" and version == "latest":
return thunderbird_latest_version_filter
return RELEASE_AND_CANDIDATE_LATEST_VERSIONS[version]
Expand Down Expand Up @@ -714,7 +716,7 @@ def get_build_info(self):

def query_versions(self, version=None):
"""Check specified version and resolve special values."""
if version not in RELEASE_AND_CANDIDATE_LATEST_VERSIONS:
if version not in RELEASE_AND_CANDIDATE_LATEST_VERSIONS and not version.isnumeric():
return [version]

url = urljoin(self.base_url, 'releases/')
Expand Down
Loading