From b39d6e1bcb9a4ce51119dcc424a5e92e8255a8ca Mon Sep 17 00:00:00 2001 From: "Hansen, Tony (th1395)" Date: Sat, 18 Dec 2021 17:11:43 +0000 Subject: fix ambiguous dates in Changelog.md files also add an optional call to 'python -m black' Change-Id: I4e7a83ac4251d794304a1e728e0f2c183bf5e3a2 Signed-off-by: Hansen, Tony (th1395) Issue-ID: DCAEGEN2-3026 Signed-off-by: Hansen, Tony (th1395) Issue-ID: DCAEGEN2-2997 Signed-off-by: Hansen, Tony (th1395) --- scripts/mvn-phase-lib.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'scripts') diff --git a/scripts/mvn-phase-lib.sh b/scripts/mvn-phase-lib.sh index d4e1256..fa0e951 100644 --- a/scripts/mvn-phase-lib.sh +++ b/scripts/mvn-phase-lib.sh @@ -1,4 +1,5 @@ #!/bin/bash +# -*- indent-tabs-mode: nil -*- # vi: set expandtab: # ================================================================================ # Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved. @@ -205,11 +206,11 @@ test_templates() done | awk '{print $2}' | sed -e 's/"//g' | sort -u | while read url do - curl -L -w '%{http_code}' -s -o /dev/null "$url" > "$TMP" - case $(< "$TMP") in - 2* ) ;; - * ) echo ">>>>>>>>>>>>>>>> $url not found <<<<<<<<<<<<<<<<" ;; - esac + curl -L -w '%{http_code}' -s -o /dev/null "$url" > "$TMP" + case $(< "$TMP") in + 2* ) ;; + * ) echo ">>>>>>>>>>>>>>>> $url not found <<<<<<<<<<<<<<<<" ;; + esac done echo Verify that the inputs are correct @@ -217,7 +218,7 @@ test_templates() find . -name '*-template' | sed -e 's/-template$//' | while read blueprint do - check-blueprint-vs-input -b "$blueprint" -i check-blueprint-vs-input/lib/sample-inputs.yaml || true + check-blueprint-vs-input -b "$blueprint" -i check-blueprint-vs-input/lib/sample-inputs.yaml || true done } @@ -228,7 +229,7 @@ run_tox_test() CURDIR=$(pwd) TOXINIS=$(find . -name "tox.ini") for TOXINI in "${TOXINIS[@]}"; do - DIR=$(echo "$TOXINI" | rev | cut -f2- -d'/' | rev) + DIR=$(dirname "$TOXINI") cd "${CURDIR}/${DIR}" rm -rf ./venv-tox ./.tox python3 -m venv ./venv-tox @@ -237,6 +238,11 @@ run_tox_test() pip3 install pip==9.0.3 pip3 install --upgrade argparse pip3 install tox==2.9.1 + if [ "$RUN_BLACK" = yes ] + then + pip3 install black + python3 -m black --line-length 120 --check . + fi pip3 freeze tox deactivate -- cgit 1.2.3-korg