Skip to content

Commit

Permalink
#364 exclude more
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Sep 16, 2024
1 parent 6040774 commit aea9f21
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tests/before/test-executability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,13 @@ set -o pipefail

stdout=$2

declare -a excludes=()
for e in dataset lib pylint_plugins venv; do
excludes+=(-not -path "${LOCAL}/${e}/**")
done

{
scripts=$(find "${LOCAL}" -not -path "${LOCAL}/dataset/**" -type f -name '*.sh')
scripts=$(find "${LOCAL}" "${excludes[@]}" -type f -name '*.sh')
echo "${scripts}" | while IFS= read -r sh; do
if [ ! -x "${sh}" ]; then
echo "Script '${sh}' is not executable, try running 'chmod +x ${sh}'"
Expand All @@ -38,7 +43,7 @@ stdout=$2
echo "👍🏻 All .sh scripts are executable"

{
scripts=$(find "${LOCAL}" -not -path "${LOCAL}/dataset/**" -type f -name '*.py')
scripts=$(find "${LOCAL}" "${excludes[@]}" -type f -name '*.py')
echo "${scripts}" | while IFS= read -r py; do
if [ ! -x "${py}" ]; then
echo "Script '${py}' is not executable, try running 'chmod +x ${py}'"
Expand Down

0 comments on commit aea9f21

Please sign in to comment.