summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Herlant <aerostitch@debian.org>2019-11-02 04:13:22 -0700
committerJoseph Herlant <aerostitch@debian.org>2019-11-02 04:13:22 -0700
commit3125ffcc6e00745f69633893bdd5949c40d859ab (patch)
treeee17ccb7a4bc0c42431f3f35106577a5bc5f26c4
parent5e47311b079280a01d59726b5acb673b8a281891 (diff)
downloadnavit-3125ffcc6e00745f69633893bdd5949c40d859ab.tar.gz
Fix some variables names forgotten in the refactoring
-rwxr-xr-xscripts/check_need_build.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/check_need_build.sh b/scripts/check_need_build.sh
index 129489ce8..c02a969ee 100755
--- a/scripts/check_need_build.sh
+++ b/scripts/check_need_build.sh
@@ -13,21 +13,23 @@ declare -a file_list=$(git diff --name-only refs/remotes/origin/trunk)
# If there is no diff that might just mean that you are on the trunk or master branch
# so you just want to check the last commit. This way we still have that check more
# or less working when pushing directly to trunk or when merging in master.
-if [[ -z "$files" ]]; then
+if [[ -z "$file_list" ]]; then
file_list=$(git diff --name-only HEAD^)
fi
# This block filters out those don't match the pattern we use to exclude files that should not trigger a build.
-declare -a filters=('^docs/.*' '.*\.md$' '.*\.rst$')
+declare -a filters=('^docs/.*' '.*\.md$' '.*\.rst$' '.*') # WARNING! '.*' is here only for testing if the circleci command works. It should be removed before merge!
for f in ${file_list[@]}; do
for filter in "${filters[@]}" ; do
+ echo "checking $f with filter $filter"
if [[ "$f" =~ $filter ]]; then
# This removes the element from the element matching the filter
file_list=(${file_list[@]/$f})
+ echo "filtering out $f"
break
fi
done
done
# exits with a 0 if the list is empty
-[[ -z "${filte_list}" ]]
+[[ -z "${file_list}" ]]