Adding CLI parameters : --add-suffix and --exclude-drafts

This commit is contained in:
2026-05-07 00:19:58 +01:00
parent 123e9d3338
commit ad0ebb307d
4 changed files with 73 additions and 29 deletions

View File

@@ -17,7 +17,7 @@ import shutil
import openpyxl
from rich.console import Console
from eb_dashboard_utils import get_nested_value, get_old_filename as _get_old_filename, get_config_path, get_dashboard_config_path
from eb_dashboard_utils import get_nested_value, get_old_filename as _get_old_filename, get_config_path, get_dashboard_config_path, get_output_filename
from eb_dashboard_constants import (
INCLUSIONS_FILE_NAME,
ORGANIZATIONS_FILE_NAME,
@@ -318,10 +318,10 @@ def run_check_only_mode(sys_argv):
# Run quality checks (will load all files internally)
print()
old_inclusions_file = _get_old_filename(INCLUSIONS_FILE_NAME, OLD_FILE_SUFFIX)
old_inclusions_file = _get_old_filename(get_output_filename(INCLUSIONS_FILE_NAME), OLD_FILE_SUFFIX)
has_coherence_critical, has_regression_critical = run_quality_checks(
current_inclusions=INCLUSIONS_FILE_NAME,
organizations_list=ORGANIZATIONS_FILE_NAME,
current_inclusions=get_output_filename(INCLUSIONS_FILE_NAME),
organizations_list=get_output_filename(ORGANIZATIONS_FILE_NAME),
old_inclusions_filename=old_inclusions_file
)
@@ -370,8 +370,8 @@ def backup_output_files():
except Exception as e:
logging.warning(f"Could not backup {source}: {e}")
_backup_file_silent(INCLUSIONS_FILE_NAME, _get_old_filename(INCLUSIONS_FILE_NAME, OLD_FILE_SUFFIX))
_backup_file_silent(ORGANIZATIONS_FILE_NAME, _get_old_filename(ORGANIZATIONS_FILE_NAME, OLD_FILE_SUFFIX))
_backup_file_silent(get_output_filename(INCLUSIONS_FILE_NAME), _get_old_filename(get_output_filename(INCLUSIONS_FILE_NAME), OLD_FILE_SUFFIX))
_backup_file_silent(get_output_filename(ORGANIZATIONS_FILE_NAME), _get_old_filename(get_output_filename(ORGANIZATIONS_FILE_NAME), OLD_FILE_SUFFIX))
# ============================================================================