Bump backend version to 0.1.1 and validate plugin manifest sync
This commit is contained in:
@@ -11,6 +11,7 @@ from pathlib import Path
|
||||
ROOT = Path(__file__).resolve().parents[2]
|
||||
SETTINGS_PATH = ROOT / 'backend' / 'app' / 'core' / 'config.py'
|
||||
SIGNED_DIR = ROOT / 'XPI' / 'signed'
|
||||
MANIFEST_PATH = ROOT / 'webextension' / 'manifest.json'
|
||||
VERSION_RE = re.compile(r'\d+\.\d+\.\d+')
|
||||
|
||||
|
||||
@@ -43,6 +44,12 @@ def main() -> None:
|
||||
fail(f'backend version {backend_version} is not a valid three-part version')
|
||||
|
||||
extension_version, xpi_path = find_latest_signed_xpi()
|
||||
source_manifest = json.loads(MANIFEST_PATH.read_text())
|
||||
if source_manifest.get('version') != extension_version:
|
||||
fail(
|
||||
f'webextension/manifest.json version {source_manifest.get("version")!r} does not match '
|
||||
f'the latest signed XPI version {extension_version!r}'
|
||||
)
|
||||
with zipfile.ZipFile(xpi_path) as archive:
|
||||
try:
|
||||
packaged_manifest = json.loads(archive.read('manifest.json'))
|
||||
|
||||
Reference in New Issue
Block a user