Skip to content

Commit ef3b5b4

Browse files
authored
Merge pull request #127 from SAP-samples/serajahmad01-patch-1
[update] updating CI yaml file
2 parents 223c111 + f0447a7 commit ef3b5b4

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,18 @@ jobs:
6161
id: iOSVersion
6262
if: github.event_name != 'workflow_dispatch'
6363
run: |
64-
iOSVersion=$(if [[ ${{env.determinedFrameworkVersion}} = 9* ]]; then echo '15.0'; else echo '16.0'; fi)
65-
echo "$iOSVersion"
64+
frameworkVersion=${{ env.determinedFrameworkVersion }}
65+
majorMinorVersion=$(echo $frameworkVersion | cut -d '.' -f 1-2)
66+
if [ "$majorMinorVersion" = "24.12" ]; then
67+
iOSVersion="17.0"
68+
elif [ "$majorMinorVersion" = "24.8" ] || [ "$majorMinorVersion" = "24.4" ] || [ "$majorMinorVersion" = "10.0" ]; then
69+
iOSVersion="16.0"
70+
else
71+
iOSVersion="16.0" # Default fallback
72+
fi
73+
echo "Framework version: $frameworkVersion -> iOS version: $iOSVersion"
6674
echo "iOSVersion=$iOSVersion" >> $GITHUB_ENV
75+
6776
- name: Create Podfile with latest podspecs
6877
if: github.event_name != 'workflow_dispatch'
6978
run: |
@@ -100,13 +109,17 @@ jobs:
100109
cat Podfile
101110
- name: "Displays Xcode current version"
102111
run: sudo xcode-select -p
103-
- name: Determine Xcode version needed
112+
- name: Determine Xcode version based on iOS version
104113
run: |
105-
neededXcode='Xcode_15.4'
114+
if [[ ${{ env.iOSVersion }} == '17.0' ]]; then
115+
neededXcode='Xcode_16.1'
116+
else
117+
neededXcode='Xcode_15.4'
118+
fi
106119
echo "neededXcode=$neededXcode" >> $GITHUB_ENV
107-
- name: "Set Xcode version 15.4"
108-
if: env.neededXcode == 'Xcode_15.4'
109-
run: sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
120+
- name: "Set Xcode version"
121+
if: env.neededXcode != ''
122+
run: sudo xcode-select -s /Applications/${{ env.neededXcode }}.app/Contents/Developer
110123
- name: Create test application
111124
run: |
112125
cd .testing

0 commit comments

Comments
 (0)