Skip to content

Commit d7a9f7c

Browse files
feat: Add Rokt SDK+ repo to mono repo
1 parent ba68b4c commit d7a9f7c

11 files changed

Lines changed: 472 additions & 26 deletions

File tree

.github/workflows/build-kits.yml

Lines changed: 43 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,14 @@ jobs:
3737
- name: Pod Lib Lint
3838
run: |
3939
echo "Linting: ${{ matrix.kit.podspec }}"
40+
INCLUDES="{mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}"
41+
if [ -n "${{ matrix.kit.pod_lint_include_podspecs }}" ]; then
42+
INCLUDES="${INCLUDES},${{ matrix.kit.pod_lint_include_podspecs }}"
43+
fi
4044
for attempt in 1 2 3; do
4145
pod lib lint "${{ matrix.kit.podspec }}" \
4246
--allow-warnings \
43-
--include-podspecs="{mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}" \
47+
--include-podspecs="$INCLUDES" \
4448
&& break
4549
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
4650
done
@@ -69,35 +73,55 @@ jobs:
6973
- name: Resolve SPM dependencies
7074
run: |
7175
SCHEME=$(echo '${{ toJson(matrix.kit.schemes) }}' | jq -r '.[0].scheme')
72-
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/*.xcodeproj | head -1)"
73-
74-
xcodebuild -resolvePackageDependencies -project "$PROJECT" \
75-
-scheme "$SCHEME" -derivedDataPath DerivedData
76+
LOCAL_PATH="${{ matrix.kit.local_path }}"
77+
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
78+
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
79+
xcodebuild -resolvePackageDependencies -project "$PROJECT" \
80+
-scheme "$SCHEME" -derivedDataPath DerivedData
81+
else
82+
(cd "$LOCAL_PATH" && xcodebuild -resolvePackageDependencies -scheme "$SCHEME" -derivedDataPath "$OLDPWD/DerivedData")
83+
fi
7684
7785
- name: Build kit schemes
7886
run: |
87+
LOCAL_PATH="${{ matrix.kit.local_path }}"
7988
echo '${{ toJson(matrix.kit.schemes) }}' | jq -c '.[]' | while IFS= read -r ENTRY; do
8089
SCHEME=$(echo "$ENTRY" | jq -r '.scheme')
8190
DEST=$(echo "$ENTRY" | jq -r '.destination')
8291
83-
if [ -d "${{ matrix.kit.local_path }}/$SCHEME.xcodeproj" ]; then
84-
PROJECT="${{ matrix.kit.local_path }}/$SCHEME.xcodeproj"
92+
if [ -d "$LOCAL_PATH/$SCHEME.xcodeproj" ]; then
93+
PROJECT="$LOCAL_PATH/$SCHEME.xcodeproj"
94+
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
95+
elif compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
96+
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
97+
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
8598
else
86-
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/*.xcodeproj | head -1)"
99+
XB=(xcodebuild build -scheme "$SCHEME")
87100
fi
88101
89-
xcodebuild build -project "$PROJECT" -scheme "$SCHEME" \
90-
-destination "generic/platform=$DEST" \
91-
-derivedDataPath DerivedData \
92-
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
93-
94-
xcodebuild build -project "$PROJECT" -scheme "$SCHEME" \
95-
-destination "generic/platform=$DEST Simulator" \
96-
-derivedDataPath DerivedData \
97-
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
102+
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
103+
"${XB[@]}" \
104+
-destination "generic/platform=$DEST" \
105+
-derivedDataPath DerivedData \
106+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
107+
"${XB[@]}" \
108+
-destination "generic/platform=$DEST Simulator" \
109+
-derivedDataPath DerivedData \
110+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
111+
else
112+
(cd "$LOCAL_PATH" && "${XB[@]}" \
113+
-destination "generic/platform=$DEST" \
114+
-derivedDataPath "$OLDPWD/DerivedData" \
115+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
116+
(cd "$LOCAL_PATH" && "${XB[@]}" \
117+
-destination "generic/platform=$DEST Simulator" \
118+
-derivedDataPath "$OLDPWD/DerivedData" \
119+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
120+
fi
98121
done
99122
100123
- name: Build SPM-Swift-Example
124+
if: ${{ matrix.kit.skip_example_builds != true }}
101125
run: |
102126
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Swift-Example/*.xcodeproj | head -1)"
103127
xcodebuild build -project "$PROJECT" -scheme SPM-Swift-Example \
@@ -106,6 +130,7 @@ jobs:
106130
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
107131
108132
- name: Build SPM-Objc-Example
133+
if: ${{ matrix.kit.skip_example_builds != true }}
109134
run: |
110135
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Objc-Example/*.xcodeproj | head -1)"
111136
xcodebuild build -project "$PROJECT" -scheme SPM-Objc-Example \
@@ -114,6 +139,7 @@ jobs:
114139
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
115140
116141
- name: Run SPM tests
142+
if: ${{ matrix.kit.skip_spm_tests != true }}
117143
run: |
118144
cd ${{ matrix.kit.local_path }}
119145
PACKAGE=$(grep -E '^\s*name:' Package.swift | head -1 | sed 's/.*"\([^"]*\)".*/\1/')

.github/workflows/release-draft.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ jobs:
8888
run: |
8989
sed -i '' "s/kMPRoktKitVersion = @\"[^\"]*\"/kMPRoktKitVersion = @\"${VERSION}\"/" \
9090
Kits/rokt/rokt/Sources/mParticle-Rokt/MPKitRokt.m
91+
sed -i '' 's/public static let version = "[^"]*"/public static let version = "'"${VERSION}"'"/' \
92+
Kits/rokt-sdk-plus/rokt-sdk-plus-ios/Sources/RoktSDKPlus/RoktSDKPlus.swift
9193
sed -i '' "s/kLibVersion = @\"[^\"]*\"/kLibVersion = @\"${VERSION}\"/" \
9294
Kits/clevertap/clevertap-7/Sources/mParticle-CleverTap/MPKitCleverTap.m
9395
sed -i '' "s/registerPluginName:@\"mParticleKit\" version:@\"[^\"]*\"/registerPluginName:@\"mParticleKit\" version:@\"${VERSION}\"/" \
@@ -157,7 +159,7 @@ jobs:
157159
### Files updated
158160
- All podspecs (core, Swift, kits) → \`${VERSION}\`
159161
- \`mParticle-Apple-SDK/MPIConstants.m\`
160-
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
162+
- Kit source version strings (Rokt \`kMPRoktKitVersion\`, RoktSDKPlus \`RoktSDKPlus.version\`, CleverTap \`kLibVersion\`, Branch \`registerPluginName\`)
161163
- \`Framework/Info.plist\`
162164
- Integration test mappings
163165
- Kit \`Package.swift\`: \`let version\` → core SDK SPM pin (major bumps only)

.github/workflows/release-publish.yml

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,10 @@ jobs:
162162
163163
if [ -d "$LOCAL_PATH/$SCHEME.xcodeproj" ]; then
164164
PROJECT="$LOCAL_PATH/$SCHEME.xcodeproj"
165-
else
165+
elif compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
166166
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
167+
else
168+
PROJECT=""
167169
fi
168170
169171
ARCHIVE_DEVICE="archives/${MODULE}-${DEST}"
@@ -184,10 +186,18 @@ jobs:
184186
;;
185187
esac
186188
187-
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
188-
-destination "$PLATFORM_DEVICE" -archivePath "$ARCHIVE_DEVICE" $BUILD_SETTINGS
189-
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
190-
-destination "$PLATFORM_SIM" -archivePath "$ARCHIVE_SIM" $BUILD_SETTINGS
189+
REPO_ROOT="$PWD"
190+
if [ -n "$PROJECT" ]; then
191+
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
192+
-destination "$PLATFORM_DEVICE" -archivePath "$ARCHIVE_DEVICE" $BUILD_SETTINGS
193+
xcodebuild archive -project "$PROJECT" -scheme "$SCHEME" \
194+
-destination "$PLATFORM_SIM" -archivePath "$ARCHIVE_SIM" $BUILD_SETTINGS
195+
else
196+
(cd "$LOCAL_PATH" && xcodebuild archive -scheme "$SCHEME" \
197+
-destination "$PLATFORM_DEVICE" -archivePath "$REPO_ROOT/$ARCHIVE_DEVICE" $BUILD_SETTINGS)
198+
(cd "$LOCAL_PATH" && xcodebuild archive -scheme "$SCHEME" \
199+
-destination "$PLATFORM_SIM" -archivePath "$REPO_ROOT/$ARCHIVE_SIM" $BUILD_SETTINGS)
200+
fi
191201
192202
XCFRAMEWORK_ARGS+=" -archive ${ARCHIVE_DEVICE}.xcarchive -framework ${MODULE}.framework"
193203
XCFRAMEWORK_ARGS+=" -archive ${ARCHIVE_SIM}.xcarchive -framework ${MODULE}.framework"
@@ -210,7 +220,7 @@ jobs:
210220
runs-on: macOS-latest
211221
needs: [load-matrix, build-kits, release-core-sdk]
212222
env:
213-
DEST_ORG: mparticle-integrations
223+
DEST_ORG: ${{ matrix.kit.dest_org || 'mparticle-integrations' }}
214224
strategy:
215225
fail-fast: false
216226
matrix:
@@ -242,7 +252,7 @@ jobs:
242252
with:
243253
client-id: ${{ secrets.SDK_RELEASE_GITHUB_CLIENT_ID }}
244254
private-key: ${{ secrets.SDK_RELEASE_GITHUB_APP_PRIVATE_KEY }}
245-
owner: ${{ env.DEST_ORG }}
255+
owner: ${{ matrix.kit.dest_org || 'mparticle-integrations' }}
246256
repositories: ${{ matrix.kit.dest_repo }}
247257
permission-contents: write
248258

@@ -375,6 +385,24 @@ jobs:
375385
sleep 60
376386
done
377387
388+
- name: Wait for mParticle-Rokt on CocoaPods CDN (RoktSDKPlus)
389+
if: matrix.kit.name == 'rokt-sdk-plus-ios'
390+
run: |
391+
VERSION=$(head -n 1 VERSION | tr -d '\r\n ')
392+
echo "⏳ Polling CocoaPods for mParticle-Rokt $VERSION (RoktSDKPlus dependency)..."
393+
MAX_ATTEMPTS=30
394+
for i in $(seq 1 $MAX_ATTEMPTS); do
395+
FOUND=$(curl -sf "https://trunk.cocoapods.org/api/v1/pods/mParticle-Rokt" \
396+
| jq -r --arg v "$VERSION" '.versions[] | select(.name == $v) | .name' 2>/dev/null || true)
397+
if [ "$FOUND" = "$VERSION" ]; then
398+
echo "✅ mParticle-Rokt $VERSION confirmed on CocoaPods trunk"
399+
exit 0
400+
fi
401+
[ "$i" -eq "$MAX_ATTEMPTS" ] && echo "❌ Timed out waiting for mParticle-Rokt" && exit 1
402+
echo " Attempt $i/$MAX_ATTEMPTS: Not yet available. Retrying in 60s..."
403+
sleep 60
404+
done
405+
378406
- name: Publish to CocoaPods
379407
if: matrix.kit.podspec != ''
380408
env:

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ For each release, **Core** (main SDK) changes are listed first, followed by **Ki
2222

2323
### Kits
2424

25+
#### Added
26+
27+
- **Rokt SDK+ (`RoktSDKPlus`)** — Umbrella Swift package and CocoaPods pod at `Kits/rokt-sdk-plus/rokt-sdk-plus-ios`, versioned with the core SDK and mirrored to [ROKT/rokt-sdk-plus-ios](https://github.com/ROKT/rokt-sdk-plus-ios).
28+
2529
#### Rokt
2630

2731
##### Changed

Kits/matrix.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,24 @@
393393
}
394394
]
395395
},
396+
{
397+
"name": "rokt-sdk-plus-ios",
398+
"local_path": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios",
399+
"podspec": "Kits/rokt-sdk-plus/rokt-sdk-plus-ios/RoktSDKPlus.podspec",
400+
"dest_repo": "rokt-sdk-plus-ios",
401+
"dest_org": "ROKT",
402+
"spm_package_only": true,
403+
"skip_example_builds": true,
404+
"skip_spm_tests": true,
405+
"pod_lint_include_podspecs": "Kits/rokt/rokt/mParticle-Rokt.podspec",
406+
"schemes": [
407+
{
408+
"scheme": "RoktSDKPlus",
409+
"module": "RoktSDKPlus",
410+
"destination": "iOS"
411+
}
412+
]
413+
},
396414
{
397415
"name": "singular-12",
398416
"local_path": "Kits/singular/singular-12",

0 commit comments

Comments
 (0)