feat: install GitHib releases also

This commit is contained in:
Vlad Stan
2023-01-18 17:38:36 +02:00
parent 41ce316fc6
commit 9d0cedfcb2
6 changed files with 79 additions and 41 deletions
+2 -5
View File
@@ -75,25 +75,22 @@ async def add_installed_extension(
ext_id: str,
version: str,
active: bool,
hash: str,
meta: dict,
conn: Optional[Connection] = None,
) -> None:
await (conn or db).execute(
"""
INSERT INTO installed_extensions (id, version, active, hash, meta) VALUES (?, ?, ?, ?, ?)
INSERT INTO installed_extensions (id, version, active, meta) VALUES (?, ?, ?, ?)
ON CONFLICT (id) DO
UPDATE SET (version, active, hash, meta) = (?, ?, ?, ?)
UPDATE SET (version, active, meta) = (?, ?, ?)
""",
(
ext_id,
version,
active,
hash,
json.dumps(meta),
version,
active,
hash,
json.dumps(meta),
),
)