mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 10:40:07 -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
|
set -euo pipefail
|
||||||
|
|
||||||
|
|
||||||
if [[ "${CI-}" == "true" ]]; then
|
if [[ "${CI-}" == "true" ]]; then
|
||||||
.buildkite/scripts/bootstrap.sh
|
.buildkite/scripts/bootstrap.sh
|
||||||
|
|
||||||
|
@ -106,10 +105,12 @@ done
|
||||||
|
|
||||||
echo "Looking for related tsconfig.json files..."
|
echo "Looking for related tsconfig.json files..."
|
||||||
|
|
||||||
for dir in "${uniq_dirs[@]}"
|
if [ ${#uniq_dirs[@]} -gt 0 ]; then
|
||||||
do
|
for dir in "${uniq_dirs[@]}"
|
||||||
find_tsconfig $dir
|
do
|
||||||
done
|
find_tsconfig $dir
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
if [ ${#uniq_tsconfigs[@]} -eq 0 ]; then
|
if [ ${#uniq_tsconfigs[@]} -eq 0 ]; then
|
||||||
if [[ "$sha1" == "--cached" ]]; then
|
if [[ "$sha1" == "--cached" ]]; then
|
||||||
|
@ -122,7 +123,17 @@ fi
|
||||||
|
|
||||||
echo "Running scripts/type_check for each found tsconfig.json file..."
|
echo "Running scripts/type_check for each found tsconfig.json file..."
|
||||||
|
|
||||||
|
finalExitCode=0
|
||||||
|
|
||||||
for tsconfig in "${uniq_tsconfigs[@]}"
|
for tsconfig in "${uniq_tsconfigs[@]}"
|
||||||
do
|
do
|
||||||
|
set +e
|
||||||
node scripts/type_check --project $tsconfig
|
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