From af5d38a16bd909982e7053213b8497f3244df464 Mon Sep 17 00:00:00 2001 From: Kolkman Date: Thu, 27 Aug 2026 18:04:49 +0200 Subject: [PATCH] Bump backend version to 0.1.1 and validate plugin manifest sync --- .env.example | 2 +- README.md | 2 +- backend/app/core/config.py | 2 +- backend/tests/test_api.py | 2 +- scripts/release/validate_release.py | 7 +++++++ 5 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index 540d46c..af4090e 100644 --- a/.env.example +++ b/.env.example @@ -8,7 +8,7 @@ APP_HEALTHCHECK_TIMEOUT=5s APP_HEALTHCHECK_START_PERIOD=10s APP_HEALTHCHECK_RETRIES=3 LINKLOG_APP_NAME=LinkLog -LINKLOG_VERSION=0.1.0 +LINKLOG_VERSION=0.1.1 LINKLOG_SECRET_KEY=replace-with-a-long-random-secret LINKLOG_DATA_ENCRYPTION_KEY=generate-with-python-cryptography-fernet-key LINKLOG_TOKEN_EXPIRY_MINUTES=15 diff --git a/README.md b/README.md index af788a9..87c05b7 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ For local development: The backend currently uses FastAPI, uvicorn, SQLite, and Pydantic. `httpx2` is included for the Starlette-compatible test client. Jinja2 is included for server-rendered HTML templates. -The backend version is `0.1.0` and is exposed through the FastAPI/OpenAPI metadata. It can be overridden with `LINKLOG_VERSION`. +The backend version is `0.1.1` and is exposed through the FastAPI/OpenAPI metadata. It can be overridden with `LINKLOG_VERSION`. LinkLog is licensed under the GNU General Public License, version 3 or any later version. See [LICENSE](LICENSE). ## Local Installation diff --git a/backend/app/core/config.py b/backend/app/core/config.py index a5e9af5..cf3c0e5 100644 --- a/backend/app/core/config.py +++ b/backend/app/core/config.py @@ -24,7 +24,7 @@ def normalize_public_url(value: str) -> str: class Settings: app_env: str = os.getenv('APP_ENV', 'development').lower() app_name: str = os.getenv('LINKLOG_APP_NAME', 'LinkLog') - version: str = os.getenv('LINKLOG_VERSION', '0.1.0') + version: str = os.getenv('LINKLOG_VERSION', '0.1.1') database_url: str = os.getenv('LINKLOG_DATABASE_URL', f'sqlite:///{DB_PATH}') secret_key: str = os.getenv('LINKLOG_SECRET_KEY', 'dev-secret-key-change-me') data_encryption_key: str = os.getenv('LINKLOG_DATA_ENCRYPTION_KEY', '') diff --git a/backend/tests/test_api.py b/backend/tests/test_api.py index cc95689..2db4f38 100644 --- a/backend/tests/test_api.py +++ b/backend/tests/test_api.py @@ -31,7 +31,7 @@ def login_headers(username='alice'): def test_login_returns_token(): - assert app.version == '0.1.0' + assert app.version == '0.1.1' response = client.post('/api/auth/login', json={ 'email': 'alice@example.com', 'password': 'secret123', diff --git a/scripts/release/validate_release.py b/scripts/release/validate_release.py index beacb0b..f8c6b86 100644 --- a/scripts/release/validate_release.py +++ b/scripts/release/validate_release.py @@ -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'))