feat(db-load-xml, db-load-git): add -UpdateDB flag to combine load + update in one Designer run

Closes #8 — adds /UpdateDBCfg parameter support so users can load config
and update database in a single 1C Designer invocation instead of two.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-03-13 10:57:15 +03:00
parent 733418e630
commit f7a27e750d
6 changed files with 43 additions and 9 deletions
@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# db-load-git v1.1 — Load Git changes into 1C database
# db-load-git v1.2 — Load Git changes into 1C database
# Source: https://github.com/Nikolay-Shirokov/cc-1c-skills
import argparse
@@ -84,6 +84,7 @@ def main():
help="File format (default: Hierarchical)",
)
parser.add_argument("-DryRun", action="store_true", help="Only show what would be loaded (no actual load)")
parser.add_argument("-UpdateDB", action="store_true", help="Also update database configuration after load")
args = parser.parse_args()
# --- Resolve V8Path (skip if DryRun) ---
@@ -238,6 +239,10 @@ def main():
elif args.AllExtensions:
arguments.append("-AllExtensions")
# --- UpdateDB ---
if args.UpdateDB:
arguments.append("/UpdateDBCfg")
# --- Output ---
out_file = os.path.join(temp_dir, "load_log.txt")
arguments += ["/Out", out_file]