mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-11 13:17:07 +00:00
chore: drop Makefile trailing newline and reuse utils.PROJECT_ROOT in bundle_apps
- utils/inventory/bundle_apps.py: replace the local REPO_ROOT `Path(__file__).resolve().parents[2]` with the canonical `from utils import PROJECT_ROOT`. Move `Iterable`/`Path` imports under `TYPE_CHECKING` since they are now only referenced in type hints. - Makefile: strip trailing newline from the redeploy-bundles target file.
This commit is contained in:
2 files changed
+9
-6
No files matched your search
@@ -388,4 +388,4 @@ deploy-bundles: down up
|
||||
|
||||
# Redeploy all apps cumulated from inventory bundles on an existing inventory (no down/up, no entity purge; requires a prior deploy-bundles run).
|
||||
redeploy-bundles:
|
||||
@bash scripts/tests/deploy/local/deploy/redeploy-bundles.sh
|
||||
@bash scripts/tests/deploy/local/deploy/redeploy-bundles.sh
|
||||
@@ -14,15 +14,18 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Iterable
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from utils import PROJECT_ROOT
|
||||
from utils.cache.yaml import load_yaml
|
||||
|
||||
REPO_ROOT = Path(__file__).resolve().parents[2]
|
||||
if TYPE_CHECKING:
|
||||
from collections.abc import Iterable
|
||||
from pathlib import Path
|
||||
|
||||
SEARCH_DIRS = (
|
||||
REPO_ROOT / "inventories" / "bundles" / "servers",
|
||||
REPO_ROOT / "inventories" / "bundles" / "workstations",
|
||||
PROJECT_ROOT / "inventories" / "bundles" / "servers",
|
||||
PROJECT_ROOT / "inventories" / "bundles" / "workstations",
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user