mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
Improve Type Check Commit Diff script (#167381)
This commit is contained in:
parent
3cec6e5ed5
commit
22fca89861
1 changed files with 17 additions and 6 deletions
|
@ -2,7 +2,6 @@
|
|||
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
if [[ "${CI-}" == "true" ]]; then
|
||||
.buildkite/scripts/bootstrap.sh
|
||||
|
||||
|
@ -106,10 +105,12 @@ done
|
|||
|
||||
echo "Looking for related tsconfig.json files..."
|
||||
|
||||
for dir in "${uniq_dirs[@]}"
|
||||
do
|
||||
find_tsconfig $dir
|
||||
done
|
||||
if [ ${#uniq_dirs[@]} -gt 0 ]; then
|
||||
for dir in "${uniq_dirs[@]}"
|
||||
do
|
||||
find_tsconfig $dir
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ${#uniq_tsconfigs[@]} -eq 0 ]; then
|
||||
if [[ "$sha1" == "--cached" ]]; then
|
||||
|
@ -122,7 +123,17 @@ fi
|
|||
|
||||
echo "Running scripts/type_check for each found tsconfig.json file..."
|
||||
|
||||
finalExitCode=0
|
||||
|
||||
for tsconfig in "${uniq_tsconfigs[@]}"
|
||||
do
|
||||
set +e
|
||||
node scripts/type_check --project $tsconfig
|
||||
done
|
||||
exitCode=$?
|
||||
set -e
|
||||
if [ "$exitCode" -gt "$finalExitCode" ]; then
|
||||
finalExitCode=$exitCode
|
||||
fi
|
||||
done
|
||||
|
||||
exit $finalExitCode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue