From 56eaba484f3ee0065f15a2858c1c462eaff802de Mon Sep 17 00:00:00 2001 From: "Julio C. Estrada" Date: Wed, 15 Jan 2025 13:00:33 -0500 Subject: [PATCH] Add Error Handling for Missing lib Directory in CI (publish) Workflow (#393) * add 'set -e' to libdoc.sh for better error handling * enhance publish.yml workflow with 'set -e' for error handling in CI script * add 'set -x' to libdoc.sh for command tracing --- .github/workflows/publish.yml | 2 ++ libdoc.sh | 3 +++ 2 files changed, 5 insertions(+) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 8b97ac2..2284036 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -135,6 +135,7 @@ jobs: if: steps.build.outputs.build-libs == 'true' shell: bash run: | + set -e set -x BOOST_SRC_DIR="${{ steps.boost-clone.outputs.boost-dir }}" export BOOST_SRC_DIR @@ -145,6 +146,7 @@ jobs: shell: bash working-directory: build run: | + set -e set -x find "lib" -mindepth 1 -maxdepth 1 -type d -exec rm -r {} + # find "cpp-reference-extension" -mindepth 1 -maxdepth 1 -type d -exec rm -r {} + diff --git a/libdoc.sh b/libdoc.sh index ab894a5..a5ae1fa 100755 --- a/libdoc.sh +++ b/libdoc.sh @@ -15,6 +15,9 @@ # User's Guide. # +set -x +set -e + if [ $# -eq 0 ]; then echo "Usage: $0 { branch | version | 'release' | 'all' }..." echo