mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-16 16:14:28 -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue