Skip to content

Commit 6279992

Browse files
noahsmartinitaybre
andauthored
feat(v9): Add API stability for V9 (#5622)
* Add API stability for V9 * Improvements * Update Makefile Co-authored-by: Itay Brenner <itay.brenner@sentry.io> * Rebase --------- Co-authored-by: Itay Brenner <itay.brenner@sentry.io>
1 parent 2bddb03 commit 6279992

File tree

9 files changed

+57333
-10
lines changed

9 files changed

+57333
-10
lines changed

.github/workflows/api-stability.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,33 @@ on:
1414
jobs:
1515
api-stability:
1616
runs-on: macos-15
17+
strategy:
18+
matrix:
19+
version: [default, v9]
1720
steps:
1821
- name: Checkout code
1922
uses: actions/checkout@v4
2023
with:
2124
fetch-depth: 0
22-
- run: ./scripts/ci-select-xcode.sh 16.3
25+
- run: ./scripts/ci-select-xcode.sh 16.4
2326

2427
- name: Generate HEAD SDK
2528
run: |
26-
mv sdk_api.json sdk_api_base.json
27-
make generate-public-api
29+
if [ "${{ matrix.version }}" = "v9" ]; then
30+
mv sdk_api_v9.json sdk_api_base.json
31+
make generate-public-api CONFIG=V9
32+
mv sdk_api_v9.json sdk_api.json
33+
else
34+
mv sdk_api.json sdk_api_base.json
35+
make generate-public-api
36+
fi
2837
2938
- name: Diagnose breaking changes
3039
run: |
3140
if diff -q "sdk_api_base.json" "sdk_api.json" > /dev/null; then
32-
echo "No API changes detected."
41+
echo "No API changes detected for ${{ matrix.version }} version."
3342
else
34-
echo "❌ Public API changes are detected. If theyre intended run "make generate-public-api" and commit the changes."
43+
echo "❌ Public API changes are detected for ${{ matrix.version }} version. If they're intended run "make generate-public-api" and commit the changes."
3544
diff "sdk_api_base.json" "sdk_api.json" || true
3645
xcrun --sdk iphoneos swift-api-digester \
3746
-diagnose-sdk \

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
args: [--allow-multiple-documents]
2424
- id: detect-private-key
2525
- id: end-of-file-fixer
26-
exclude: ^sdk_api.json$
26+
exclude: ^sdk_api.*\.json$
2727

2828
- repo: https://github.com/python-jsonschema/check-jsonschema
2929
rev: 0.27.3
@@ -72,7 +72,7 @@ repos:
7272
types_or: [json]
7373
entry: dprint
7474
language: system
75-
exclude: ^sdk_api.json$
75+
exclude: ^sdk_api.*\.json$
7676
args:
7777
- "fmt"
7878

Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ format-yaml:
8888

8989
generate-public-api:
9090
./scripts/update-api.sh
91+
./scripts/update-api.sh V9
9192

9293
## Current git reference name
9394
GIT-REF := $(shell git rev-parse --abbrev-ref HEAD)

0 commit comments

Comments
 (0)