Skip to content

Commit 736bcfb

Browse files
authored
feat(V9): Fix API diff script for V9 (#5635)
* feat(V9): Fix API diff script for V9 * Add api changes
1 parent 102cf89 commit 736bcfb

File tree

3 files changed

+1074
-1923
lines changed

3 files changed

+1074
-1923
lines changed

.github/workflows/api-stability.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
- Sentry.xcodeproj/**
1111
- "Package.swift"
1212
- "scripts/build-xcframework-local.sh"
13+
- "scripts/update-api.sh"
1314

1415
jobs:
1516
api-stability:

scripts/update-api.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ configuration_suffix="${1-}"
1111
# This ensures only public interfaces are analyzed
1212
find ./Sentry-Dynamic.xcframework -name "*.private.swiftinterface" -type f -delete
1313

14+
if [ "$configuration_suffix" = "V9" ]; then
15+
FWROOT="./Sentry-Dynamic.xcframework/ios-arm64_arm64e/Sentry.framework"
16+
for FRAME in Headers PrivateHeaders; do
17+
HDRDIR="$FWROOT/${FRAME}"
18+
for H in "$HDRDIR"/*.h; do
19+
# unifdef will:
20+
# - keep code under #if SDK_V9 (because of -D)
21+
# - remove code under #else
22+
# - strip away the #if/#else/#endif lines themselves
23+
unifdef -D SDK_V9 -x 2 "$H" > "$H.tmp"
24+
mv "$H.tmp" "$H"
25+
done
26+
done
27+
fi
28+
1429
xcrun --sdk iphoneos swift-api-digester \
1530
-dump-sdk \
1631
-o sdk_api${configuration_suffix:+"_${configuration_suffix}"}.json \

0 commit comments

Comments
 (0)