-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto update iOS XCFramework in CI once new version is released
RV-174
- Loading branch information
Showing
5 changed files
with
71 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
if [[ "$#" -ne 2 ]]; then | ||
echo "Usage: $0 <SDK_VERSION> <SDK_REVISION>" | ||
exit 1 | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "${SCRIPT_DIR}/ci_update_in_pipeline.include.sh" | ||
|
||
NEW_VERSION="$1" | ||
NEW_REVISION="$2" | ||
MAKEFILE="$SCRIPT_DIR/../android/Makefile" | ||
|
@@ -21,15 +22,7 @@ SDK_REVISION=$NEW_REVISION\\ | |
" $MAKEFILE | ||
|
||
echo "Makefile version updated new version: $NEW_VERSION revision: $NEW_REVISION" | ||
echo "Pushing updated Makefile to master..." | ||
|
||
git config user.name "CI Pipeline" | ||
git config user.email "[email protected]" | ||
git remote add gitlab_origin https://oauth2:$CI_GITLAB_TOKEN@gitlab.com/sinch/sinch-projects/voice/vvc-client-sdk/rtc-vvc-reference-applications.git | ||
git fetch gitlab_origin | ||
git checkout -t gitlab_origin/master | ||
git add ./android/Makefile | ||
git commit -m "Auto update Android SDK to:$NEW_VERSION+$NEW_REVISION" | ||
git push gitlab_origin master -o ci.skip | ||
|
||
push_version_update_to_gitlab "Auto update Android SDK to $NEW_VERSION+$NEW_REVISION" "$MAKEFILE" | ||
|
||
echo "DONE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
|
||
function push_version_update_to_gitlab() { | ||
if [ -z "$1" ]; then | ||
echo "No commit message provided. Exiting" | ||
exit 1 | ||
else | ||
echo "Will push changes with commit message: $1" | ||
fi | ||
if [ -z "$2" ]; then | ||
echo "No update file path provided. Exiting" | ||
exit 1 | ||
else | ||
echo "Will commit changes inside file: $2" | ||
fi | ||
git config user.name "CI Pipeline" | ||
git config user.email "[email protected]" | ||
git remote add gitlab_origin https://oauth2:$CI_GITLAB_TOKEN@gitlab.com/sinch/sinch-projects/voice/vvc-client-sdk/rtc-vvc-reference-applications.git | ||
git fetch gitlab_origin | ||
git checkout -t gitlab_origin/master | ||
git add "$2" | ||
git commit -m "$1" | ||
git push gitlab_origin master -o ci.skip | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
if [[ "$#" -ne 1 ]]; then | ||
echo "Usage: $0 <SDK_VERSION_FULL>" | ||
exit 1 | ||
fi | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
source "${SCRIPT_DIR}/ci_update_in_pipeline.include.sh" | ||
|
||
NEW_VERSION="$1" | ||
UPDATE_SCRIPT="$SCRIPT_DIR/../ios/SinchReferenceApp/fetch_xcframework_if_needed.sh" | ||
|
||
sed -i '' "/^readonly SDK_VERSION/c\\ | ||
readonly SDK_VERSION=\"$NEW_VERSION\"\\ | ||
" $UPDATE_SCRIPT | ||
|
||
echo "Changed SDK version inside iOS SDK download script to new version: $NEW_VERSION" | ||
|
||
push_version_update_to_gitlab "Auto update iOS SDK to $NEW_VERSION" "$UPDATE_SCRIPT" | ||
|
||
echo "DONE" |