Skip to content

Commit b53be91

Browse files
authored
[FSSDK-8918] chore: fix run_prep script (#492)
Fix cocopods version and home env for run_prep.sh
1 parent 8f3d442 commit b53be91

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

.github/workflows/swift.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ jobs:
6565
BRANCH: ${{ github.ref_name }}
6666
GITHUB_USER: optibot
6767
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
68+
COCOAPODS_VERSION: '1.11.3'
6869
run: |
69-
gem install cocoapods -v '1.9.3'
70+
gem install cocoapods -v $COCOAPODS_VERSION
7071
Scripts/run_prep.sh
7172
- name: Check prepare for release failure
7273
if: steps.prepare_for_release.conclusion == 'failure'
@@ -84,6 +85,7 @@ jobs:
8485
env:
8586
GITHUB_TOKEN: ${{ secrets.CI_USER_TOKEN }}
8687
BRANCH: ${{ github.ref_name }}
88+
COCOAPODS_VERSION: '1.11.3'
8789
run: |
88-
gem install cocoapods -v '1.9.3'
90+
gem install cocoapods -v $COCOAPODS_VERSION
8991
Scripts/run_release.sh

Scripts/run_prep.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,12 @@ function do_stuff {
4040
trap 'error_handler' ERR
4141

4242
# we need pod install or test_all.sh fails
43-
pod repo update
44-
pod install
43+
44+
# cocoapods requires ENV['HOME'] with absolute path
45+
HOME=$(pwd)
46+
gem install cocoapods -v $COCOAPODS_VERSION
47+
pod _${COCOAPODS_VERSION}_ repo update
48+
pod _${COCOAPODS_VERSION}_ install
4549

4650
myscripts=( "update_version.sh ${VERSION}" "build_all.sh" "test_all.sh" )
4751
for i in "${myscripts[@]}"; do

Scripts/test_all.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ for i in "${!deviceModels[@]}"; do
2121
Scripts/prepare_simulator.sh
2222
echo "Testing OptimizelySwiftSDK-${platforms[$i]} (${deviceModels[$i]},OS=${osVersions[$i]})"
2323

24-
xcrun xcodebuild -workspace OptimizelySwiftSDK.xcworkspace -scheme "OptimizelySwiftSDK-${platforms[$i]}" -sdk "${testSdks[$i]}" -destination "platform=${platforms[$i]} Simulator,name=${deviceModels[$i]},OS=${osVersions[$i]}" test
24+
xcrun xcodebuild -workspace OptimizelySwiftSDK.xcworkspace -scheme "OptimizelySwiftSDK-${platforms[$i]}" -sdk "${testSdks[$i]}" -configuration Release -destination "platform=${platforms[$i]} Simulator,name=${deviceModels[$i]},OS=${osVersions[$i]}" test
2525
done

0 commit comments

Comments
 (0)