Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS versioning for Cocoapods changes #111

Merged
merged 1 commit into from
May 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/shared-publish-to-ios-version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,12 @@ jobs:
- name: Update UID2.Client.ios
run: |
current_version=$(grep -o '<string>.*</string>' ${{ inputs.working_dir }}/Sources/UID2/Properties/sdk_properties.plist | head -1 | sed 's/<string>\(.*\)<\/string>/\1/')
formatted_current_version=$(grep -o '\d*,\s*\d*,\s*\d*' ${{ inputs.working_dir }}/Sources/UID2/Properties/UID2SDKProperties.swift | head -1)
current_version=$(echo "$formatted_current_version" | sed 's/\(.*\),[[:space:]]*\(.*\),[[:space:]]*\(.*\)/\1.\2.\3/')
new_version=${{ steps.version.outputs.new_version }}
sed -i '' -e "s/$current_version/$new_version/g" ${{ inputs.working_dir }}/Sources/UID2/Properties/sdk_properties.plist
formatted_new_version=$(echo "$new_version" | sed 's/\([[:digit:]]\)\.\([[:digit:]]\)\.\([[:digit:]]\)/\1, \2, \3/')
sed -i '' -e "s/$formatted_current_version/$formatted_new_version/g" ${{ inputs.working_dir }}/Sources/UID2/Properties/UID2SDKProperties.swift
sed -i '' -e "s/$current_version/$new_version/g" ${{ inputs.working_dir }}/UID2.podspec.json
echo "Version number updated from $current_version to $new_version"
- name: Select Xcode 15.3
Expand All @@ -72,10 +75,10 @@ jobs:
xcodebuild -scheme UID2 -sdk iphonesimulator17.4 -destination "OS=17.4,name=iPhone 15"
xcodebuild test -scheme UID2 -sdk iphonesimulator17.4 -destination "OS=17.4,name=iPhone 15"
- name: Commit sdk_properties, version.json and set tag
- name: Commit SDK properties, podspec, version.json and set tag
uses: IABTechLab/uid2-shared-actions/actions/commit_pr_and_merge@v2
with:
add: '${{ inputs.working_dir }}/Sources/UID2/Properties/sdk_properties.plist ${{ inputs.working_dir }}/version.json'
add: '${{ inputs.working_dir }}/Sources/UID2/Properties/UID2SDKProperties.swift ${{ inputs.working_dir }}/UID2.podspec.json ${{ inputs.working_dir }}/version.json'
message: 'Released ${{ inputs.release_type }} version: ${{ steps.version.outputs.new_version }}'
tag: v${{ steps.version.outputs.new_version }}

Expand Down