Skip to content

Commit

Permalink
chore: improve bash checks
Browse files Browse the repository at this point in the history
  • Loading branch information
adthrasher committed Sep 17, 2024
1 parent 6dddc86 commit ab4a956
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lint=$1
exclusions=$2

if [ ! -z "$exclusions" ]; then
if [ -n "$exclusions" ]; then
echo "Exclusions provided. Writing to .sprocket.yml."
echo -n "" > .sprocket.yml
for exclusion in $(echo $exclusions | sed 's/,/ /')
Expand All @@ -17,9 +17,13 @@ EXITCODE=0
echo "Checking WDL files using \`sprocket lint\`."
for file in $(find $GITHUB_WORKSPACE -name "*.wdl")
do
if [ $(echo $file | grep -cvf .sprocket.yml) -eq 0 ]; then
echo " [***] Excluding $file [***]"
continue
if [ -e ".sprocket.yml" ]
then
if [ $(echo $file | grep -cvf .sprocket.yml) -eq 0 ]
then
echo " [***] Excluding $file [***]"
continue
fi
fi
echo " [***] $file [***]"
sprocket check $lint $file || EXITCODE=$(($? || EXITCODE))
Expand Down

0 comments on commit ab4a956

Please sign in to comment.