scripts: Add mobilizon-reshare.sh. (#106)

* scripts: Add mobilizon-reshare.sh.

This script lets you run mobilizon-reshare commands from your git
checkout. This is very useful for debugging new features or in general
just to have a quick feedback loop from your modifications.

Example usage:

$ scripts/mobilizon-reshare.sh inspect all
This commit is contained in:
Giacomo Leidi 2021-11-28 16:42:42 +01:00 committed by GitHub
parent 49b79de38f
commit 227ce22d57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 2 deletions

View File

@ -1,5 +1,4 @@
import importlib.resources
import os
from pathlib import Path
from typing import Optional
@ -63,7 +62,6 @@ def build_settings(
) as bundled_settings_path:
for f in [
settings_file,
os.environ.get("MOBILIZION_RESHARE_SETTINGS_FILE"),
Path(dirs.user_config_dir, "mobilizon_reshare.toml"),
Path(dirs.site_config_dir, "mobilizon_reshare.toml"),
bundled_settings_path,

9
scripts/mobilizon-reshare.sh Executable file
View File

@ -0,0 +1,9 @@
#!/usr/bin/env bash
export MOBILIZON_RESHARE_LOG_DIR="/tmp"
export MOBILIZON_RESHARE_LOCAL_STATE_DIR="/tmp"
export SECRETS_FOR_DYNACONF="$(pwd)/.secrets.toml"
export SETTINGS_FILE_FOR_DYNACONF="$(pwd)/mobilizon_reshare.toml"
export ENV_FOR_DYNACONF="production"
poetry run mobilizon-reshare "$@"