From e2ec4c91ba0712c8a7ac6ff81bdd9d4e93e76be0 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Wed, 31 May 2023 10:58:45 -0700 Subject: [PATCH] tidying --- .github/workflows/ci.yml | 2 -- tools/batools/pcommand2.py | 23 ++++++++++++----------- tools/batools/spinoff/_main.py | 7 +++++-- 3 files changed, 17 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c9f9e8cf..f1e46544 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -54,8 +54,6 @@ jobs: run: tools/pcommand install_pip_reqs - name: Build prereqs run: make prereqs - - name: Hmmm - run: clang-format --version - name: Build spinoff project with no featuresets run: tools/pcommand spinoff_test empty diff --git a/tools/batools/pcommand2.py b/tools/batools/pcommand2.py index 5b83e829..d1d5b979 100644 --- a/tools/batools/pcommand2.py +++ b/tools/batools/pcommand2.py @@ -325,21 +325,22 @@ def spinoff_test() -> None: flush=True, ) subprocess.run(['rm', '-rf', path], check=True) + cmd = [ + './tools/spinoff', + 'create', + 'SpinoffTest', + path, + '--featuresets', + 'none', + ] + print(Clr.MAG + ' '.join(cmd) + Clr.RST) subprocess.run( - [ - './tools/spinoff', - 'create', - 'SpinoffTest', - path, - '--featuresets', - 'none', - '--noninteractive', - ], + cmd + ['--noninteractive'], check=True, ) os.makedirs(path, exist_ok=True) - print(f'{Clr.BLU}Running spinoff update...{Clr.RST}', flush=True) - subprocess.run(['./tools/spinoff', 'update'], cwd=path, check=True) + print(f'{Clr.MAG}tools/spinoff update{Clr.RST}', flush=True) + subprocess.run(['tools/spinoff', 'update'], cwd=path, check=True) subprocess.run(['make', 'cmake-server-binary'], cwd=path, check=True) else: raise CleanError(f"Invalid test type '{testtype}'.") diff --git a/tools/batools/spinoff/_main.py b/tools/batools/spinoff/_main.py index 85ed9690..8c67e505 100644 --- a/tools/batools/spinoff/_main.py +++ b/tools/batools/spinoff/_main.py @@ -210,10 +210,13 @@ def _do_create(src_root: str | None, dst_root: str) -> None: # on git so its best to always do this. subprocess.run(['git', 'init'], cwd=path, check=True, capture_output=True) + print( + f'{Clr.GRN}{Clr.BLD}Spinoff dst project created at' + f' {Clr.RST}{Clr.BLD}{path}{Clr.RST}{Clr.GRN}.{Clr.RST}' + ) if not noninteractive: print( - f'{Clr.GRN}{Clr.BLD}Spinoff dst project created at' - f' {Clr.RST}{Clr.BLD}{path}{Clr.RST}{Clr.GRN}.{Clr.RST}\n\n' + '\n' 'Next, from dst project root, do:\n' f' {Clr.BLD}{Clr.MAG}./tools/spinoff update{Clr.RST} ' '- Syncs src project into dst.\n'