Skip to content

Commit 129f1d2

Browse files
feat: Add Rokt SDK+ repo to mono repo
1 parent d36439d commit 129f1d2

11 files changed

Lines changed: 473 additions & 26 deletions

File tree

.github/workflows/build-kits.yml

Lines changed: 44 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,15 @@ 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
44+
INCLUDES="{${INCLUDES}}"
4045
for attempt in 1 2 3; do
4146
pod lib lint "${{ matrix.kit.podspec }}" \
4247
--allow-warnings \
43-
--include-podspecs="{mParticle-Apple-SDK-Swift.podspec,mParticle-Apple-SDK-ObjC.podspec,mParticle-Apple-SDK.podspec}" \
48+
--include-podspecs="$INCLUDES" \
4449
&& break
4550
[ $attempt -lt 3 ] && echo "Attempt $attempt failed, retrying in 60s..." && sleep 60 || exit 1
4651
done
@@ -69,35 +74,55 @@ jobs:
6974
- name: Resolve SPM dependencies
7075
run: |
7176
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
77+
LOCAL_PATH="${{ matrix.kit.local_path }}"
78+
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
79+
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
80+
xcodebuild -resolvePackageDependencies -project "$PROJECT" \
81+
-scheme "$SCHEME" -derivedDataPath DerivedData
82+
else
83+
(cd "$LOCAL_PATH" && xcodebuild -resolvePackageDependencies -scheme "$SCHEME" -derivedDataPath "$OLDPWD/DerivedData")
84+
fi
7685
7786
- name: Build kit schemes
7887
run: |
88+
LOCAL_PATH="${{ matrix.kit.local_path }}"
7989
echo '${{ toJson(matrix.kit.schemes) }}' | jq -c '.[]' | while IFS= read -r ENTRY; do
8090
SCHEME=$(echo "$ENTRY" | jq -r '.scheme')
8191
DEST=$(echo "$ENTRY" | jq -r '.destination')
8292
83-
if [ -d "${{ matrix.kit.local_path }}/$SCHEME.xcodeproj" ]; then
84-
PROJECT="${{ matrix.kit.local_path }}/$SCHEME.xcodeproj"
93+
if [ -d "$LOCAL_PATH/$SCHEME.xcodeproj" ]; then
94+
PROJECT="$LOCAL_PATH/$SCHEME.xcodeproj"
95+
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
96+
elif compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
97+
PROJECT="$(ls -d "$LOCAL_PATH"/*.xcodeproj | head -1)"
98+
XB=(xcodebuild build -project "$PROJECT" -scheme "$SCHEME")
8599
else
86-
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/*.xcodeproj | head -1)"
100+
XB=(xcodebuild build -scheme "$SCHEME")
87101
fi
88102
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
103+
if compgen -G "$LOCAL_PATH"/*.xcodeproj > /dev/null; then
104+
"${XB[@]}" \
105+
-destination "generic/platform=$DEST" \
106+
-derivedDataPath DerivedData \
107+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
108+
"${XB[@]}" \
109+
-destination "generic/platform=$DEST Simulator" \
110+
-derivedDataPath DerivedData \
111+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
112+
else
113+
(cd "$LOCAL_PATH" && "${XB[@]}" \
114+
-destination "generic/platform=$DEST" \
115+
-derivedDataPath "$OLDPWD/DerivedData" \
116+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
117+
(cd "$LOCAL_PATH" && "${XB[@]}" \
118+
-destination "generic/platform=$DEST Simulator" \
119+
-derivedDataPath "$OLDPWD/DerivedData" \
120+
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO)
121+
fi
98122
done
99123
100124
- name: Build SPM-Swift-Example
125+
if: ${{ matrix.kit.skip_example_builds != true }}
101126
run: |
102127
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Swift-Example/*.xcodeproj | head -1)"
103128
xcodebuild build -project "$PROJECT" -scheme SPM-Swift-Example \
@@ -106,6 +131,7 @@ jobs:
106131
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
107132
108133
- name: Build SPM-Objc-Example
134+
if: ${{ matrix.kit.skip_example_builds != true }}
109135
run: |
110136
PROJECT="$(ls -d ${{ matrix.kit.local_path }}/Example/SPM-Objc-Example/*.xcodeproj | head -1)"
111137
xcodebuild build -project "$PROJECT" -scheme SPM-Objc-Example \
@@ -114,6 +140,7 @@ jobs:
114140
CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO
115141
116142
- name: Run SPM tests
143+
if: ${{ matrix.kit.skip_spm_tests != true }}
117144
run: |
118145
cd ${{ matrix.kit.local_path }}
119146
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)