From bd747d9ca3462e9c88a09d5f1d34d4237ed0909e Mon Sep 17 00:00:00 2001 From: Miles Frain Date: Sat, 20 Nov 2021 21:02:08 -0800 Subject: [PATCH] Detect setup script errors in CI --- scripts/removeAnchors.sh | 5 +++++ scripts/resetSolutions.sh | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/scripts/removeAnchors.sh b/scripts/removeAnchors.sh index 0d2e7138..3e6105cd 100755 --- a/scripts/removeAnchors.sh +++ b/scripts/removeAnchors.sh @@ -2,6 +2,11 @@ # This script removes all code anchors to improve readability +# Echo commands to shell +set -x +# Exit on first failure +set -e + # All .purs & .js files in the src/ and test/ directories of chapter exercises. FILES=$(find . -regextype posix-extended -regex '\./exercises/chapter[0-9]{1,2}/(src|test)/.*\.(purs|js)' -type f) diff --git a/scripts/resetSolutions.sh b/scripts/resetSolutions.sh index cbb31e4b..0088aec5 100755 --- a/scripts/resetSolutions.sh +++ b/scripts/resetSolutions.sh @@ -4,6 +4,11 @@ # - Removes lines with a note to delete them. # - Moves the no-peeking directory outside of the compilation path. +# Echo commands to shell +set -x +# Exit on first failure +set -e + # For all chapters for d in exercises/*; do # if directory (excludes LICENSE file)