-
-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #152 from fermoya/develop
Version 1.13.0
- Loading branch information
Showing
15 changed files
with
138 additions
and
68 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
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 |
---|---|---|
|
@@ -3,7 +3,6 @@ | |
name: Rebase branch legacy-projects | ||
|
||
on: | ||
# Trigger the workflow on push pull request or manually | ||
push: | ||
branches: [ develop ] | ||
|
||
|
@@ -13,7 +12,9 @@ jobs: | |
rebase: | ||
name: Checkout legacy-projects and rebase | ||
runs-on: ubuntu-latest | ||
steps: | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Automatic Rebase | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }} | ||
|
@@ -22,29 +23,4 @@ jobs: | |
USER_EMAIL: [email protected] | ||
OUTDATED_BRANCH: legacy-projects | ||
BASE_BRANCH: develop | ||
run: | | ||
FOLDER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) | ||
git clone https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git | ||
cd $FOLDER | ||
git checkout $OUTDATED_BRANCH | ||
echo Adding origin as $GITHUB_REPOSITORY | ||
git remote set-url origin https://x-access-token:[email protected]/$GITHUB_REPOSITORY.git | ||
git config --global user.email "$USER_EMAIL" | ||
git config --global user.name "$USER_NAME" | ||
git fetch origin $BASE_BRANCH | ||
echo git pull --rebase origin $OUTDATED_BRANCH | ||
git pull --rebase origin $OUTDATED_BRANCH | ||
echo Rebasing $BASE_BRANCH onto $OUTDATED_BRANCH | ||
echo git rebase origin/$BASE_BRANCH | ||
git rebase origin/$BASE_BRANCH | ||
echo git push --force-with-lease origin $OUTDATED_BRANCH | ||
git push --force-with-lease origin $OUTDATED_BRANCH | ||
cd .. | ||
rm -rf $FOLDER | ||
run: ./scripts/rebase.sh |
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
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
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
File renamed without changes.
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,11 @@ | ||
gem install xcpretty | ||
|
||
SCHEMES=( SwiftUIPager_Catalyst SwiftUIPager_macOS SwiftUIPager_iOS SwiftUIPager_watchOS SwiftUIPager_tvOS ) | ||
PLATFORMS=( "platform=macOS,variant=Mac Catalyst" "platform=macOS" "generic/platform=iOS" "generic/platform=watchOS" "generic/platform=tvOS" ) | ||
|
||
rm -rd $DIR | ||
for i in ${!SCHEMES[@]}; do | ||
xcodebuild clean build -scheme ${SCHEMES[$i]} \ | ||
-project SwiftUIPager.xcodeproj \ | ||
-destination "${PLATFORMS[$i]}" || exit 1 | ||
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,55 @@ | ||
gem install xcpretty | ||
|
||
LIB_NAME="SwiftUIPager" | ||
PROJ_PATH="$LIB_NAME.xcodeproj" | ||
BUILD_PATH=".build" | ||
FRAMEWORKS_PATH="$BUILD_PATH/frameworks" | ||
XCFRAMEWORK_NAME="$LIB_NAME.xcframework" | ||
XCFRAMEWORK_ZIP="$XCFRAMEWORK_NAME.zip" | ||
XCFRAMEWORK_PATH="$BUILD_PATH/$XCFRAMEWORK_NAME" | ||
XCFRAMEWORK_ZIP_PATH="$BUILD_PATH/$XCFRAMEWORK_ZIP" | ||
rm $XCFRAMEWORK_ZIP_PATH | ||
|
||
SCHEMES=( SwiftUIPager_Catalyst SwiftUIPager_macOS SwiftUIPager_iOS SwiftUIPager_watchOS SwiftUIPager_tvOS ) | ||
PLATFORMS=( | ||
"platform=macOS,variant=Mac Catalyst" | ||
"platform=macOS" | ||
"generic/platform=iOS;generic/platform=iOS Simulator" | ||
"generic/platform=watchOS;generic/platform=watchOS Simulator" | ||
"generic/platform=tvOS;generic/platform=tvOS Simulator" | ||
) | ||
ARCHIVES=( | ||
"$LIB_NAME.macCatalyst.xcarchive" | ||
"$LIB_NAME.macos.xcarchive" | ||
"$LIB_NAME.iOS.xcarchive;$LIB_NAME.iOS-simulator.xcarchive" | ||
"$LIB_NAME.watchOS.xcarchive;$LIB_NAME.watchOS-simulator.xcarchive" | ||
"$LIB_NAME.tvOS.xcarchive;$LIB_NAME.tvOS-simulator.xcarchive" | ||
) | ||
|
||
COMMAND="xcodebuild -create-xcframework " | ||
xcodebuild clean -project $PROJ_PATH | ||
for i in ${!SCHEMES[@]}; do | ||
IFS=";" read -r -a PLATFORM <<< "${PLATFORMS[i]}" | ||
IFS=";" read -r -a ARCHIVE <<< "${ARCHIVES[i]}" | ||
|
||
for j in ${!PLATFORM[@]}; do | ||
ARCHIVE_PATH="$FRAMEWORKS_PATH/${ARCHIVE[$j]}" | ||
xcodebuild archive -scheme ${SCHEMES[$i]} \ | ||
-project $PROJ_PATH \ | ||
-destination "${PLATFORM[$j]}" \ | ||
-archivePath $ARCHIVE_PATH \ | ||
SKIP_INSTALL=NO \ | ||
BUILD_LIBRARY_FOR_DISTRIBUTION=YES | xcpretty | ||
|
||
COMMAND="$COMMAND -framework $ARCHIVE_PATH/Products/Library/Frameworks/$LIB_NAME.framework" | ||
done | ||
|
||
done | ||
COMMAND="$COMMAND -output $XCFRAMEWORK_PATH" | ||
$COMMAND | xcpretty | ||
rm -rd $FRAMEWORKS_PATH | ||
cd $BUILD_PATH | ||
zip -r -X $XCFRAMEWORK_ZIP $XCFRAMEWORK_NAME | ||
rm -rd $XCFRAMEWORK_NAME | ||
cd .. | ||
echo ::set-output name=path::$XCFRAMEWORK_ZIP_PATH |
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,29 @@ | ||
FOLDER=$(echo $GITHUB_REPOSITORY | cut -d'/' -f2) | ||
TEMP_DIR=".tmp" | ||
|
||
mkdir $TEMP_DIR | ||
cd $TEMP_DIR | ||
|
||
git clone https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git | ||
cd $FOLDER | ||
git checkout $OUTDATED_BRANCH | ||
|
||
echo Adding origin as $GITHUB_REPOSITORY | ||
git remote set-url origin https://x-access-token:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY.git | ||
git config --global user.email "$USER_EMAIL" | ||
git config --global user.name "$USER_NAME" | ||
|
||
git fetch origin $BASE_BRANCH | ||
|
||
echo git pull --rebase origin $OUTDATED_BRANCH | ||
git pull --rebase origin $OUTDATED_BRANCH | ||
|
||
echo Rebasing $BASE_BRANCH onto $OUTDATED_BRANCH | ||
echo git rebase origin/$BASE_BRANCH | ||
git rebase origin/$BASE_BRANCH | ||
|
||
echo git push --force-with-lease origin $OUTDATED_BRANCH | ||
git push --force-with-lease origin $OUTDATED_BRANCH | ||
|
||
cd ../.. | ||
rm -rf $TEMP_DIR |