From 2225aad716978b790b96ec3d0a0b58d001331014 Mon Sep 17 00:00:00 2001 From: magic wand Date: Tue, 13 Feb 2024 02:56:39 +0000 Subject: [PATCH] adjust makefile --- build/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/build/Makefile b/build/Makefile index 9ab754b6..048447a3 100644 --- a/build/Makefile +++ b/build/Makefile @@ -72,15 +72,15 @@ OSCAL_CLI_INSTALL_URL:=https://repo1.maven.org/maven2/gov/nist/secauto/oscal/too OSCAL_CLI_INSTALL_PATH := $(shell which oscal-cli 2>/dev/null) ifeq ($(OSCAL_CLI_INSTALL_PATH),) OSCAL_CLI_INSTALL_PATH := ./oscal-cli/ -else -OSCAL_CLI_INSTALL_PATH := $(shell dirname $$(dirname $$(which oscal-cli))) -endif $(OSCAL_CLI_INSTALL_PATH): @echo "Downloading OSCAL CLI version $(OSCAL_CLI_VERSION)..."; \ mkdir -p $(OSCAL_CLI_INSTALL_PATH); \ curl $(CURL_INSTALL_OPTS) -o $(OSCAL_CLI_INSTALL_PATH)/oscal-cli.zip $(OSCAL_CLI_INSTALL_URL); \ unzip -o $(OSCAL_CLI_INSTALL_PATH)/oscal-cli.zip -d $(OSCAL_CLI_INSTALL_PATH); \ chmod +x $(OSCAL_CLI_INSTALL_PATH)/bin/$(OSCAL_CLI_BIN) +else +OSCAL_CLI_INSTALL_PATH := $(shell dirname $$(dirname $$(which oscal-cli))) +endif .PHONY: dependencies @@ -187,6 +187,7 @@ validate-xml-by-cli: $(OSCAL_CLI_INSTALL_PATH) ## Validate XML files by director @echo "Validating XML files by directory using OSCAL CLI Tool" @$(OSCAL_CLI_INSTALL_PATH)/bin/$(OSCAL_CLI_BIN) --version @echo "latest oscal-cli version is $(OSCAL_CLI_VERSION)" + @echo "Validating OSCAL content with $(OSCAL_CLI_INSTALL_PATH)/bin/oscal-cli version $(OSCAL_CLI_VERSION)" @find $(SRC_DIR)/examples -mindepth 1 -maxdepth 1 -type d | while read example_dir; do \ example_type=$$(basename "$$example_dir"); \ echo "Processing example type: $$example_type"; \