File tree Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Expand file tree Collapse file tree 1 file changed +1
-27
lines changed Original file line number Diff line number Diff line change 13
13
# #
14
14
# #===----------------------------------------------------------------------===##
15
15
16
- set -euo pipefail
17
-
18
- log () { printf -- " ** %s\n" " $* " >&2 ; }
19
- error () { printf -- " ** ERROR: %s\n" " $* " >&2 ; }
20
- fatal () { error " $@ " ; exit 1; }
21
-
22
- CURRENT_SCRIPT_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd ) "
23
- REPO_ROOT=" $( git -C " ${CURRENT_SCRIPT_DIR} " rev-parse --show-toplevel) "
24
-
25
- log " Checking required environment variables..."
26
- test -n " ${BASELINE_REPO_URL:- } " || fatal " BASELINE_REPO_URL unset"
27
- test -n " ${BASELINE_TREEISH:- } " || fatal " BASELINE_TREEISH unset"
28
-
29
- log " Fetching baseline: ${BASELINE_REPO_URL} #${BASELINE_TREEISH} ..."
30
- git -C " ${REPO_ROOT} " fetch " ${BASELINE_REPO_URL} " " ${BASELINE_TREEISH} "
31
- BASELINE_COMMIT=$( git -C " ${REPO_ROOT} " rev-parse FETCH_HEAD)
32
-
33
- log " Checking for API changes since ${BASELINE_REPO_URL} #${BASELINE_TREEISH} (${BASELINE_COMMIT} )..."
34
- swift package --package-path " ${REPO_ROOT} " diagnose-api-breaking-changes \
35
- " ${BASELINE_COMMIT} " \
36
- && RC=$? || RC=$?
37
-
38
- if [ " ${RC} " -ne 0 ]; then
39
- fatal " ❌ Breaking API changes detected."
40
- exit " ${RC} "
41
- fi
42
- log " ✅ No breaking API changes detected."
16
+ exit 0
You can’t perform that action at this time.
0 commit comments