Skip to content

Commit

Permalink
Add NGINX GitHub support and bump version
Browse files Browse the repository at this point in the history
Moved the known NGINX repository from Mercurial to GitHub for more consistent access and better integration. Updated version to 3.5.6 to reflect this significant change and documented it in the changelog.
  • Loading branch information
dvershinin committed Sep 10, 2024
1 parent dde0707 commit 710a4f0
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.

## [3.5.6] - 2024-09-08
### Fixed
* Known NGINX repo has been moved to GitHub

## [3.5.5] - 2024-08-27
### Fixed
* Fixed some GitHub API nuances and incorrect versions returned #168
Expand Down
2 changes: 1 addition & 1 deletion src/lastversion/__about__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Package metadata"""

__version__ = "3.5.5"
__version__ = "3.5.6"
__self__ = "dvershinin/lastversion"
9 changes: 9 additions & 0 deletions src/lastversion/repo_holders/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,15 @@ class GitHubRepoSession(BaseProjectHolder):
"cmake": {"repo": "kitware/cmake"},
"kodi": {"repo": "xbmc/xbmc"},
"quictls": {"repo": "quictls/openssl"},
"nginx": {
"repo": "nginx/nginx",
"branches": {
"stable": "\\.\\d?[02468]\\.",
"mainline": "\\.\\d?[13579]\\.",
},
# get URL from website instead of GitHub because it is "prepared" source
"release_url_format": "https://nginx.org/download/{name}-{version}.{ext}",
},
}

"""
Expand Down
16 changes: 2 additions & 14 deletions src/lastversion/repo_holders/mercurial.py
Original file line number Diff line number Diff line change
@@ -1,24 +1,12 @@
"""Mercurial repository holder."""

from lastversion.repo_holders.base import BaseProjectHolder


class MercurialRepoSession(BaseProjectHolder):
"""Mercurial repository holder."""
CAN_BE_SELF_HOSTED = True
REPO_URL_PROJECT_COMPONENTS = 1
KNOWN_REPO_URLS = {
"nginx.org": {
"repo": "nginx",
"hostname": "hg.nginx.org",
"branches": {
"stable": "\\.\\d?[02468]\\.",
"mainline": "\\.\\d?[13579]\\.",
},
# get URL from website instead of hg. because it is "prepared" source
"release_url_format": "https://nginx.org/download/{name}-{version}.{ext}",
}
}

KNOWN_REPOS_BY_NAME = {"nginx": KNOWN_REPO_URLS["nginx.org"]}

# http://hg.nginx.org/nginx/archive/release-1.19.2.tar.gz
RELEASE_URL_FORMAT = "https://{hostname}/{repo}/archive/{tag}.{ext}"
Expand Down

0 comments on commit 710a4f0

Please sign in to comment.