diff --git a/tests/get_stacks.sh b/tests/get_stacks.sh index cd262dca9..3f1c41757 100755 --- a/tests/get_stacks.sh +++ b/tests/get_stacks.sh @@ -1,18 +1,20 @@ #!/bin/bash +stacks_dir=${STACKS_DIR:-stacks} + diff=$(git diff origin/main HEAD --name-only) changed_stacks=() if [ "$TEST_DELTA" == "true" ]; then for file in $diff; do - if [[ $file =~ stacks\/(.*)\/devfile\.yaml ]]; then + if [[ $file =~ ${stacks_dir}\/(.*)\/devfile\.yaml ]]; then changed_stacks+=(${BASH_REMATCH[1]}) fi done else - for file in $(find stacks -name devfile.yaml); do - if [[ $file =~ stacks\/(.*)\/devfile\.yaml ]]; then + for file in $(find ${stacks_dir} -name devfile.yaml); do + if [[ $file =~ ${stacks_dir}\/(.*)\/devfile\.yaml ]]; then changed_stacks+=(${BASH_REMATCH[1]}) fi done diff --git a/tests/validate_devfile_schemas.sh b/tests/validate_devfile_schemas.sh index e967ddc14..98d7f67c3 100755 --- a/tests/validate_devfile_schemas.sh +++ b/tests/validate_devfile_schemas.sh @@ -2,7 +2,7 @@ set -x -stacksDir=${STACKS_DIR:-"$(pwd)/stacks"} +stacksDir="$(pwd)/${STACKS_DIR:-stacks}" stackDirs=${STACKS:-"$(bash "$(pwd)/tests/get_stacks.sh")"} ginkgo run --procs 2 \