Skip to content

Commit

Permalink
chore(ci): Tighten up test-dist
Browse files Browse the repository at this point in the history
  • Loading branch information
ribose-jeffreylau committed Aug 16, 2023
1 parent 7b4ebc7 commit 70e40c6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/test-dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,27 @@ ensure_files_exist() {
done

return 1
else
>&2 echo "✅ The following files exist:"
for file in "${files_to_check[@]}"
do
>&2 echo " $file"
done
fi
}

ensure_paths_resolved() {
local bad_files=()
local files_processed=0

while read -r file
do
((files_processed++))
if grep -q '@/' "$file"
then
bad_files+=("$file")
fi
done < <(find ./dist/ -type f -name '*.ts')
done < <(find ./dist -type f -name '*.js' -o -name '*.ts')

if [[ ${#bad_files[@]} -gt 0 ]]
then
Expand All @@ -49,6 +57,8 @@ ensure_paths_resolved() {
done

return 1
else
>&2 echo "✅ All paths are resolved. ($files_processed files processed)"
fi
}

Expand Down

0 comments on commit 70e40c6

Please sign in to comment.