switch to uv builds and rc1 versioning system

This commit is contained in:
Nick Sweeting
2024-10-04 23:48:25 -07:00
parent 0876cc78d9
commit ce2e19a429
9 changed files with 1956 additions and 47 deletions

View File

@@ -26,7 +26,7 @@ def _detect_installed_version(PACKAGE_DIR: Path):
"""Autodetect the installed archivebox version by using pip package metadata, pyproject.toml file, or package.json file"""
try:
# if in production install, use pip-installed package metadata
return importlib.metadata.version(__package__ or 'archivebox')
return importlib.metadata.version(__package__ or 'archivebox').strip()
except importlib.metadata.PackageNotFoundError:
pass
@@ -35,7 +35,7 @@ def _detect_installed_version(PACKAGE_DIR: Path):
pyproject_config = (PACKAGE_DIR.parent / 'pyproject.toml').read_text().split('\n')
for line in pyproject_config:
if line.startswith('version = '):
return line.split(' = ', 1)[-1].strip('"')
return line.split(' = ', 1)[-1].strip('"').strip()
except FileNotFoundError:
# building docs, pyproject.toml is not available
pass
@@ -45,7 +45,7 @@ def _detect_installed_version(PACKAGE_DIR: Path):
package_json = (PACKAGE_DIR / 'package.json').read_text().split('\n')
for line in package_json:
if '"version": "' in line:
return line.replace('"', '').split(':')[-1].strip(',')
return line.replace('"', '').split(':')[-1].strip(',').strip()
except FileNotFoundError:
pass

View File

@@ -1,12 +1,12 @@
{
"name": "archivebox",
"version": "0.8.5",
"version": "0.8.5rc1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "archivebox",
"version": "0.8.5",
"version": "0.8.5rc1",
"license": "MIT",
"dependencies": {
"@postlight/parser": "^2.2.3",

View File

@@ -1,6 +1,6 @@
{
"name": "archivebox",
"version": "0.8.5",
"version": "0.8.5rc1",
"description": "ArchiveBox: The self-hosted internet archive",
"author": "Nick Sweeting <archivebox-npm@sweeting.me>",
"repository": "github:ArchiveBox/ArchiveBox",