-
Notifications
You must be signed in to change notification settings - Fork 1
/
updateBaseline
48 lines (37 loc) · 1.22 KB
/
updateBaseline
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/sh
# SC2086: Double quote to prevent globbing and word splitting.
# shellcheck disable=SC2086
./gradlew --stop --info
COMMON_TASKS="apiDump dependencyGuardBaseline --continue -Dlint.baselines.continue=true"
export GRADLE_OPTS="${GRADLE_OPTS} -Dorg.gradle.logging.stacktrace=all"
export GRADLE_OPTS="${GRADLE_OPTS} -Dorg.gradle.caching=false -Dkotlin.incremental=false"
export CI=true
export RELEASE=true
EXIT_CODE=0
echo ""
echo "===================================="
echo "======== RUN BASELINE TASKS ========"
echo "===================================="
# Force re-run for all the tasks
# -U: Refresh dependencies
#COMMON_TASKS="${COMMON_TASKS} --rerun-tasks -U"
./gradlew ${COMMON_TASKS} detektBaselineMerge updateLintBaseline || EXIT_CODE=101
echo ""
echo "=======> checks/latest"
cd checks/latest || exit 102
pwd
./gradlew ${COMMON_TASKS} kotlinUpgradeYarnLock || EXIT_CODE=103
echo ""
echo "=======> checks/js-only"
cd ../js-only || exit 104
pwd
./gradlew ${COMMON_TASKS} || EXIT_CODE=105
# Go back to root
cd ../../ || exit 106
if [ ${EXIT_CODE} -ne 0 ]; then
echo ""
echo "================================"
echo "== BASELINE TASKS FAILED: ${EXIT_CODE} =="
echo "================================"
exit ${EXIT_CODE}
fi