diff --git a/archivebox/main.py b/archivebox/main.py index c55a2c04..c1751528 100644 --- a/archivebox/main.py +++ b/archivebox/main.py @@ -263,7 +263,9 @@ def run(subcommand: str, @enforce_types def init(force: bool=False, out_dir: Path=OUTPUT_DIR) -> None: """Initialize a new ArchiveBox collection in the current directory""" + from core.models import Snapshot + Path(out_dir).mkdir(exist_ok=True) is_empty = not len(set(os.listdir(out_dir)) - ALLOWED_IN_OUTPUT_DIR) diff --git a/archivebox/system.py b/archivebox/system.py index b27c5e46..2191c70a 100644 --- a/archivebox/system.py +++ b/archivebox/system.py @@ -47,8 +47,8 @@ def atomic_write(path: Union[Path, str], contents: Union[dict, str, bytes], over f.write(contents) except OSError as e: print(f"[X] OSError: Failed to write {path} with fcntl.F_FULLFSYNC. ({e})") - print(" For data integrity, ArchiveBox requires a filesystem that supports atomic writes.") - print(" Filesystems and network drives that don't implement FSYNC are incompatible and require workarounds.") + print(" You can store the archive/ subfolder on a hard drive or network share that doesn't support support syncronous writes,") + print(" but the main folder containing the index.sqlite3 and ArchiveBox.conf files must be on a filesystem that supports FSYNC.") raise SystemExit(1) os.chmod(path, int(OUTPUT_PERMISSIONS, base=8)) diff --git a/bin/release_docs.sh b/bin/release_docs.sh index 114c1262..f6f57823 100755 --- a/bin/release_docs.sh +++ b/bin/release_docs.sh @@ -12,14 +12,14 @@ IFS=$'\n' REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" -SHORT_VERSION="$(echo "$VERSION" | perl -pe 's/(\d+)\.(\d+)\.(\d+)/$1.$2/g')" cd "$REPO_DIR" echo "[^] Pushing docs to github" cd docs/ -git commit -am "$NEW_VERSION release" +git add . +git commit -am "$VERSION release" git push -git tag -a "v$NEW_VERSION" -m "v$NEW_VERSION" +git tag -a "v$VERSION" -m "v$VERSION" git push origin master git push origin --tags diff --git a/bin/release_pip.sh b/bin/release_pip.sh index 87323603..a6b605bb 100755 --- a/bin/release_pip.sh +++ b/bin/release_pip.sh @@ -13,6 +13,7 @@ IFS=$'\n' REPO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && cd .. && pwd )" VERSION="$(jq -r '.version' < "$REPO_DIR/package.json")" cd "$REPO_DIR" +source "$REPO_DIR/.venv/bin/activate" # apt install python3 python3-all python3-dev diff --git a/setup.py b/setup.py index 07548234..692e5850 100755 --- a/setup.py +++ b/setup.py @@ -1,5 +1,6 @@ import json import setuptools +from setuptools.command.test import test from pathlib import Path @@ -32,6 +33,13 @@ VERSION = json.loads((PACKAGE_DIR / "package.json").read_text().strip())['versio # print('>', sys.executable, *sys.argv) +class CustomTest(test): + def run(self): + # setup.py test is deprecated, disable it here by force so stdeb doesnt run it + #super().run() + pass + + setuptools.setup( name=PKG_NAME, version=VERSION, @@ -120,4 +128,7 @@ setuptools.setup( "Framework :: Django", "Typing :: Typed", ], + cmdclass={ + "test": CustomTest, + }, )