Skip to content

Commit 85b03b6

Browse files
read environment variables STACKS and STACKS_DIR added under get_stacks.sh and validate_devfile_schemas.sh scripts.
Signed-off-by: Michael Valdron <mvaldron@redhat.com>
1 parent 1b375fb commit 85b03b6

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/get_stacks.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#!/bin/bash
22

3+
stacks_dir=${STACKS_DIR:-stacks}
4+
35
diff=$(git diff origin/main HEAD --name-only)
46

57
changed_stacks=()
68

79
if [ "$TEST_DELTA" == "true" ]; then
810
for file in $diff; do
9-
if [[ $file =~ stacks\/(.*)\/devfile\.yaml ]]; then
11+
if [[ $file =~ ${stacks_dir}\/(.*)\/devfile\.yaml ]]; then
1012
changed_stacks+=(${BASH_REMATCH[1]})
1113
fi
1214
done
1315
else
14-
for file in $(find stacks -name devfile.yaml); do
15-
if [[ $file =~ stacks\/(.*)\/devfile\.yaml ]]; then
16+
for file in $(find ${stacks_dir} -name devfile.yaml); do
17+
if [[ $file =~ ${stacks_dir}\/(.*)\/devfile\.yaml ]]; then
1618
changed_stacks+=(${BASH_REMATCH[1]})
1719
fi
1820
done

tests/validate_devfile_schemas.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -x
44

5-
stacksDir=${STACKS_DIR:-"$(pwd)/stacks"}
5+
stacksDir="$(pwd)/${STACKS_DIR:-stacks}"
66
stackDirs=${STACKS:-"$(bash "$(pwd)/tests/get_stacks.sh")"}
77

88
ginkgo run --procs 2 \

0 commit comments

Comments
 (0)