Skip to content

Commit

Permalink
Merge pull request #1919 from bunkerity/staging
Browse files Browse the repository at this point in the history
Merge branch "staging" into branch "rc"
  • Loading branch information
TheophileDiot authored Jan 20, 2025
2 parents 8a8b5e7 + d00de0c commit a7be3c5
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/push-doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ jobs:
if: inputs.HIDDEN == true
run: |
mike deploy --update-aliases --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
mike props ${{ inputs.VERSION }} --set hidden=true
mike props ${{ inputs.VERSION }} --set hidden=true --push
- name: Deploy documentation
if: inputs.HIDDEN == false
run: mike deploy --update-aliases --push --alias-type=copy ${{ inputs.VERSION }} ${{ inputs.ALIAS }}
- name: Set default doc
if: inputs.ALIAS == 'latest'
Expand Down
2 changes: 1 addition & 1 deletion src/common/cli/CLI.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self):
self.__db = None
if variables_path.is_file():
with variables_path.open() as f:
self.__variables = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
self.__variables = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

if Path(sep, "usr", "share", "bunkerweb", "db").exists():
from Database import Database # type: ignore
Expand Down
2 changes: 1 addition & 1 deletion src/common/gen/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
variables_path = Path(args.variables)
LOGGER.info(f"Variables : {variables_path}")
with variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

db = None
if DB_PATH.is_dir():
Expand Down
2 changes: 1 addition & 1 deletion src/common/gen/save_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
variables_path = Path(args.variables)
LOGGER.info(f"Variables : {variables_path}")
with variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

# Check existences and permissions
LOGGER.info("Checking arguments ...")
Expand Down
2 changes: 1 addition & 1 deletion src/scheduler/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ def healthcheck_job():
dotenv_env = {}
if tmp_variables_path.is_file():
with tmp_variables_path.open() as f:
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#"))
dotenv_env = dict(line.strip().split("=", 1) for line in f if line.strip() and not line.startswith("#") and "=" in line)

SCHEDULER = JobScheduler(environ, LOGGER, db=Database(LOGGER, sqlalchemy_string=dotenv_env.get("DATABASE_URI", getenv("DATABASE_URI", None)))) # type: ignore

Expand Down

0 comments on commit a7be3c5

Please sign in to comment.