mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-31 14:58:25 -04:00
bump version to 0.7.1 and fix version autodetection code
This commit is contained in:
parent
907d170614
commit
7377d9ebc3
10 changed files with 27 additions and 35 deletions
|
@ -40,6 +40,7 @@ from typing import Optional, Type, Tuple, Dict, Union, List
|
|||
from subprocess import run, PIPE, DEVNULL
|
||||
from configparser import ConfigParser
|
||||
from collections import defaultdict
|
||||
import importlib.metadata
|
||||
|
||||
from .config_stubs import (
|
||||
SimpleConfigValueDict,
|
||||
|
@ -374,7 +375,7 @@ ALLOWED_IN_OUTPUT_DIR = {
|
|||
}
|
||||
|
||||
def get_version(config):
|
||||
return json.loads((Path(config['PACKAGE_DIR']) / 'package.json').read_text(encoding='utf-8').strip())['version']
|
||||
return importlib.metadata.version(__package__ or 'archivebox')
|
||||
|
||||
def get_commit_hash(config):
|
||||
try:
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
../package.json
|
13
archivebox/package.json
Normal file
13
archivebox/package.json
Normal file
|
@ -0,0 +1,13 @@
|
|||
{
|
||||
"name": "archivebox",
|
||||
"version": "0.7.0",
|
||||
"description": "ArchiveBox: The self-hosted internet archive",
|
||||
"author": "Nick Sweeting <archivebox-npm@sweeting.me>",
|
||||
"repository": "github:ArchiveBox/ArchiveBox",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@postlight/parser": "^2.2.3",
|
||||
"readability-extractor": "git+https://github.com/ArchiveBox/readability-extractor.git",
|
||||
"single-file-cli": "^1.1.12"
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue