From 6091014a66485727f143fe0d13afe17ec946ab75 Mon Sep 17 00:00:00 2001 From: Eric Froemling Date: Sat, 12 Jun 2021 15:40:31 -0500 Subject: [PATCH] more internal tidying --- Makefile | 4 ++-- tools/batools/build.py | 2 +- tools/batools/pcommand.py | 13 +++++++++---- tools/batools/updateproject.py | 4 +--- 4 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 91f01a26..b537647e 100644 --- a/Makefile +++ b/Makefile @@ -900,8 +900,8 @@ cmake-server-clean: # if using this on other platforms. CPUS = $(shell getconf _NPROCESSORS_ONLN || echo 8) PROJ_DIR = ${abspath ${CURDIR}} -VERSION = $(shell tools/version_utils version) -BUILD_NUMBER = $(shell tools/version_utils build) +VERSION = $(shell tools/pcommand version_utils version) +BUILD_NUMBER = $(shell tools/pcommand version_utils build) BUILD_DIR = ${PROJ_DIR}/build LAZYBUILDDIR = .cache/lazybuild STAGE_ASSETS = ${PROJ_DIR}/tools/pcommand stage_assets diff --git a/tools/batools/build.py b/tools/batools/build.py index 0b70e819..4397dd6b 100644 --- a/tools/batools/build.py +++ b/tools/batools/build.py @@ -181,7 +181,7 @@ def lazybuild(target: str, category: SourceCategory, command: str) -> None: # Everything possibly affecting asset builds. elif category is SourceCategory.ASSETS: - paths = ['Makefile', 'tools/convert_util', 'assets/src'] + paths = ['Makefile', 'tools/pcommand', 'convert_util', 'assets/src'] # Everything possibly affecting CMake builds. elif category is SourceCategory.CMAKE: diff --git a/tools/batools/pcommand.py b/tools/batools/pcommand.py index d5a025ab..52867dd0 100644 --- a/tools/batools/pcommand.py +++ b/tools/batools/pcommand.py @@ -169,8 +169,9 @@ def lazy_increment_build() -> None: if not update_hash_only: # Just go ahead and bless; this will increment the build as needed. # subprocess.run(['make', 'bless'], check=True) - subprocess.run(['tools/version_utils', 'incrementbuild'], - check=True) + subprocess.run( + ['tools/pcommand', 'version_utils', 'incrementbuild'], + check=True) # We probably just changed code, so we need to re-calc the hash. codehash = get_files_hash(codefiles) @@ -436,8 +437,12 @@ def warm_start_asset_build() -> None: # For internal builds we don't use efrocache but we do use an # internal build cache. Download an initial cache/etc. if need be. subprocess.run( - [str(Path(PROJROOT, 'tools/convert_util')), '--init-asset-cache'], - check=True) + [ + str(Path(PROJROOT, 'tools/pcommand')), 'convert_util', + '--init-asset-cache' + ], + check=True, + ) def gendocs() -> None: diff --git a/tools/batools/updateproject.py b/tools/batools/updateproject.py index 820fe3d3..68583a8b 100755 --- a/tools/batools/updateproject.py +++ b/tools/batools/updateproject.py @@ -403,9 +403,7 @@ class Updater: # differ) if contents.startswith('#!/'): copyrightline = 1 - if fname not in [ - 'tools/devtool', 'tools/version_utils', 'tools/vmshell' - ]: + if fname not in ['tools/vmshell']: if not contents.startswith(f'#!/usr/bin/env python{PYVER}'): raise CleanError(f'Incorrect shebang (first line) for ' f'{fname}.')