From 6e4a15ab0b42ddfbb8755af69650c23bcbe02456 Mon Sep 17 00:00:00 2001 From: Bruno Hivert Date: Wed, 4 Sep 2024 16:19:30 -0400 Subject: [PATCH] fix(excluded-paths): config and warning display logic --- .github/workflows/excluded-paths.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/excluded-paths.sh b/.github/workflows/excluded-paths.sh index cc9f3f3..550b7b2 100755 --- a/.github/workflows/excluded-paths.sh +++ b/.github/workflows/excluded-paths.sh @@ -4,8 +4,9 @@ set -e # Note: actions always run at the root of the repository -if [ -n "$DTT_DOCS_EXCLUDED_PATH" ] && [ "$PROJECT_NAME" == "DTT-Docs-staging" ]; then - echo "Excluded PATHS in DTT_DOCS_EXCLUDED_PATH are \"$DTT_DOCS_EXCLUDED_PATH\"" +if [ "$DTT_DOCS_EXCLUDED_PATH" != "" ]; then + echo "Excluded PATHS in DTT_DOCS_EXCLUDED_PATH are \"$DTT_DOCS_EXCLUDED_PATH\"" + if [ "$PROJECT_NAME" == "DTT-Docs-staging" ]; then echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" echo "@@ @@" echo "@@ Use of DTT_DOCS_EXCLUDED_PATH should be reserved to production @@" @@ -13,8 +14,9 @@ if [ -n "$DTT_DOCS_EXCLUDED_PATH" ] && [ "$PROJECT_NAME" == "DTT-Docs-staging" ] echo "@@ >>>>>>>>> Make sure you are not doing something wrong <<<<<<<< @@" echo "@@ @@" echo "@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + fi else - echo "No path are excluded from this build, DTT_DOCS_EXCLUDED_PATH is absent or empty" + echo "No path are excluded from this build, DTT_DOCS_EXCLUDED_PATH is absent or empty" fi for excluded_path in ${DTT_DOCS_EXCLUDED_PATH//:/ }; do