Bump backend version to 0.1.1 and validate plugin manifest sync
This commit is contained in:
+1
-1
@@ -8,7 +8,7 @@ APP_HEALTHCHECK_TIMEOUT=5s
|
|||||||
APP_HEALTHCHECK_START_PERIOD=10s
|
APP_HEALTHCHECK_START_PERIOD=10s
|
||||||
APP_HEALTHCHECK_RETRIES=3
|
APP_HEALTHCHECK_RETRIES=3
|
||||||
LINKLOG_APP_NAME=LinkLog
|
LINKLOG_APP_NAME=LinkLog
|
||||||
LINKLOG_VERSION=0.1.0
|
LINKLOG_VERSION=0.1.1
|
||||||
LINKLOG_SECRET_KEY=replace-with-a-long-random-secret
|
LINKLOG_SECRET_KEY=replace-with-a-long-random-secret
|
||||||
LINKLOG_DATA_ENCRYPTION_KEY=generate-with-python-cryptography-fernet-key
|
LINKLOG_DATA_ENCRYPTION_KEY=generate-with-python-cryptography-fernet-key
|
||||||
LINKLOG_TOKEN_EXPIRY_MINUTES=15
|
LINKLOG_TOKEN_EXPIRY_MINUTES=15
|
||||||
|
|||||||
@@ -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.
|
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.
|
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).
|
LinkLog is licensed under the GNU General Public License, version 3 or any later version. See [LICENSE](LICENSE).
|
||||||
|
|
||||||
## Local Installation
|
## Local Installation
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ def normalize_public_url(value: str) -> str:
|
|||||||
class Settings:
|
class Settings:
|
||||||
app_env: str = os.getenv('APP_ENV', 'development').lower()
|
app_env: str = os.getenv('APP_ENV', 'development').lower()
|
||||||
app_name: str = os.getenv('LINKLOG_APP_NAME', 'LinkLog')
|
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}')
|
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')
|
secret_key: str = os.getenv('LINKLOG_SECRET_KEY', 'dev-secret-key-change-me')
|
||||||
data_encryption_key: str = os.getenv('LINKLOG_DATA_ENCRYPTION_KEY', '')
|
data_encryption_key: str = os.getenv('LINKLOG_DATA_ENCRYPTION_KEY', '')
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ def login_headers(username='alice'):
|
|||||||
|
|
||||||
|
|
||||||
def test_login_returns_token():
|
def test_login_returns_token():
|
||||||
assert app.version == '0.1.0'
|
assert app.version == '0.1.1'
|
||||||
response = client.post('/api/auth/login', json={
|
response = client.post('/api/auth/login', json={
|
||||||
'email': 'alice@example.com',
|
'email': 'alice@example.com',
|
||||||
'password': 'secret123',
|
'password': 'secret123',
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ from pathlib import Path
|
|||||||
ROOT = Path(__file__).resolve().parents[2]
|
ROOT = Path(__file__).resolve().parents[2]
|
||||||
SETTINGS_PATH = ROOT / 'backend' / 'app' / 'core' / 'config.py'
|
SETTINGS_PATH = ROOT / 'backend' / 'app' / 'core' / 'config.py'
|
||||||
SIGNED_DIR = ROOT / 'XPI' / 'signed'
|
SIGNED_DIR = ROOT / 'XPI' / 'signed'
|
||||||
|
MANIFEST_PATH = ROOT / 'webextension' / 'manifest.json'
|
||||||
VERSION_RE = re.compile(r'\d+\.\d+\.\d+')
|
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')
|
fail(f'backend version {backend_version} is not a valid three-part version')
|
||||||
|
|
||||||
extension_version, xpi_path = find_latest_signed_xpi()
|
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:
|
with zipfile.ZipFile(xpi_path) as archive:
|
||||||
try:
|
try:
|
||||||
packaged_manifest = json.loads(archive.read('manifest.json'))
|
packaged_manifest = json.loads(archive.read('manifest.json'))
|
||||||
|
|||||||
Reference in New Issue
Block a user