mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2026-04-03 06:17:53 +10:00
switch to uv builds and rc1 versioning system
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
4
archivebox/package-lock.json
generated
4
archivebox/package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user