mirror of
https://github.com/ArchiveBox/ArchiveBox.git
synced 2025-05-13 06:34:25 -04:00
use new is_mount and COMMIT_HASH config options
This commit is contained in:
parent
9f90a2d60d
commit
ccce4a6a2f
1 changed files with 4 additions and 10 deletions
|
@ -96,6 +96,7 @@ from .config import (
|
||||||
check_data_folder,
|
check_data_folder,
|
||||||
write_config_file,
|
write_config_file,
|
||||||
VERSION,
|
VERSION,
|
||||||
|
COMMIT_HASH,
|
||||||
CODE_LOCATIONS,
|
CODE_LOCATIONS,
|
||||||
EXTERNAL_LOCATIONS,
|
EXTERNAL_LOCATIONS,
|
||||||
DATA_LOCATIONS,
|
DATA_LOCATIONS,
|
||||||
|
@ -213,16 +214,9 @@ def version(quiet: bool=False,
|
||||||
print(VERSION)
|
print(VERSION)
|
||||||
|
|
||||||
if not quiet:
|
if not quiet:
|
||||||
# 0.5.6
|
# 0.6.3
|
||||||
# ArchiveBox v0.5.6 Cpython Linux Linux-4.19.121-linuxkit-x86_64-with-glibc2.28 x86_64 (in Docker) (in TTY)
|
# ArchiveBox v0.6.3 Cpython Linux Linux-4.19.121-linuxkit-x86_64-with-glibc2.28 x86_64 (in Docker) (in TTY)
|
||||||
# DEBUG=False IN_DOCKER=True IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=False FS_PERMS=644 501:20 SEARCH_BACKEND=ripgrep
|
# DEBUG=False IN_DOCKER=True IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=False FS_PERMS=644 501:20 SEARCH_BACKEND=ripgrep
|
||||||
# DEBUG=False IN_DOCKER=True IS_TTY=True TZ=UTC FS_ATOMIC=True FS_REMOTE=False FS_PERMS=644 501:20 SEARCH_BACKEND=ripgrepw
|
|
||||||
|
|
||||||
COMMIT_HASH = None
|
|
||||||
try:
|
|
||||||
COMMIT_HASH = list((PACKAGE_DIR / '../.git/refs/heads/').glob('*'))[0].read_text().strip()
|
|
||||||
except Exception as e:
|
|
||||||
pass
|
|
||||||
|
|
||||||
p = platform.uname()
|
p = platform.uname()
|
||||||
print(
|
print(
|
||||||
|
@ -233,7 +227,7 @@ def version(quiet: bool=False,
|
||||||
platform.platform(),
|
platform.platform(),
|
||||||
p.machine,
|
p.machine,
|
||||||
)
|
)
|
||||||
OUTPUT_IS_REMOTE_FS = bool(os.path.ismount(OUTPUT_DIR) or os.path.ismount(ARCHIVE_DIR))
|
OUTPUT_IS_REMOTE_FS = DATA_LOCATIONS['OUTPUT_DIR']['is_mount'] or DATA_LOCATIONS['ARCHIVE_DIR']['is_mount']
|
||||||
print(
|
print(
|
||||||
f'DEBUG={DEBUG}',
|
f'DEBUG={DEBUG}',
|
||||||
f'IN_DOCKER={IN_DOCKER}',
|
f'IN_DOCKER={IN_DOCKER}',
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue