mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-08 00:10:00 +02:00
Refactor language pack scripts: replace shell scripts with Python equivalents for improved maintainability and functionality; remove obsolete scripts and update surfer.json formatting.
This commit is contained in:
parent
2aaf3f82e6
commit
a512948eb0
8 changed files with 93 additions and 26 deletions
|
@ -7,6 +7,7 @@ from typing import Optional
|
|||
METADATA_FILENAME = "surfer.json"
|
||||
TAGS_API_URL = "https://hg.mozilla.org/releases/mozilla-release/json-tags"
|
||||
|
||||
|
||||
def get_current_version() -> Optional[str]:
|
||||
"""Retrieve the current version from the metadata file."""
|
||||
try:
|
||||
|
@ -17,6 +18,7 @@ def get_current_version() -> Optional[str]:
|
|||
print(f"Error reading current version: {e}")
|
||||
return None
|
||||
|
||||
|
||||
def get_repo_data() -> Optional[str]:
|
||||
"""Retrieve the repository data from the API."""
|
||||
try:
|
||||
|
@ -28,6 +30,7 @@ def get_repo_data() -> Optional[str]:
|
|||
print(f"Error retrieving repository data: {e}")
|
||||
return None
|
||||
|
||||
|
||||
def get_rc_response() -> Optional[str]:
|
||||
"""Get the release candidate response from the response file."""
|
||||
try:
|
||||
|
@ -68,9 +71,11 @@ def send_webhook(rc: str) -> None:
|
|||
else:
|
||||
print("Webhook URL not set.")
|
||||
|
||||
|
||||
def rc_should_be_updated(rc_response: str, current_version: str) -> bool:
|
||||
return rc_response and rc_response != current_version
|
||||
|
||||
|
||||
def main() -> int:
|
||||
current_version = get_current_version()
|
||||
rc_response = get_rc_response()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue