From e17b8e45a835d8056e03454f26de092eb71583f8 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Tue, 26 Feb 2019 16:05:02 +0100 Subject: [PATCH 01/10] GIT: QTI-912 Adding .travis.yml --- .travis.yml | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..fa2ad08 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,45 @@ +os: osx +osx_image: xcode10.1 +branches: + only: + - master +env: + global: + - WORKSPACE=RxGitLabKit.xcworkspace + - IOS_FRAMEWORK_SCHEME="RxGitLabKit-iOS" + - MACOS_FRAMEWORK_SCHEME="RxGitLabKit-macOS" + - TVOS_FRAMEWORK_SCHEME="RxGitLabKit-tvOS" + - WATCHOS_FRAMEWORK_SCHEME="RxGitLabKit-watchOS" + - DEMO_APP_SCHEME="RxGitLabKitDemoApp" + matrix: + - DESTINATION="OS=5.1,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" + + - DESTINATION="OS=12.1,name=iPhone XS" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" + - DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" + + - DESTINATION="OS=12.1,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" + + - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" + +before_install: + - brew install carthage || true + +before_script: + - carthage update --cache-builds + +script: + - set -o pipefail + - xcodebuild -version + - xcodebuild -showsdks + + # Build Framework in Release and Run Tests if specified + - if [ $RUN_TESTS == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`; + else + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`; + fi + + # Build Example in Debug if specified + - if [ $BUILD_EXAMPLE == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$DEMO_APP_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`; + fi From ba67745ba182363e1f5857e3e6832041a8ead0e3 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Tue, 26 Feb 2019 16:12:26 +0100 Subject: [PATCH 02/10] GIT: QTI-912 Testing travis on travis-setup branch. --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index fa2ad08..6e327ed 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ os: osx osx_image: xcode10.1 -branches: - only: - - master +# branches: +# only: +# - master env: global: - WORKSPACE=RxGitLabKit.xcworkspace From 7b4c7d703794d9618ce190f2471850309c5329ec Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Tue, 26 Feb 2019 17:00:26 +0100 Subject: [PATCH 03/10] GIT: QTI-912 Updating travis config. Badges added to Readme. --- .travis.yml | 12 +++--------- README.md | 7 ++++++- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6e327ed..ab548ab 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,5 @@ os: osx osx_image: xcode10.1 -# branches: -# only: -# - master env: global: - WORKSPACE=RxGitLabKit.xcworkspace @@ -12,17 +9,14 @@ env: - WATCHOS_FRAMEWORK_SCHEME="RxGitLabKit-watchOS" - DEMO_APP_SCHEME="RxGitLabKitDemoApp" matrix: - - DESTINATION="OS=5.1,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" - - DESTINATION="OS=12.1,name=iPhone XS" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" - DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" - - - DESTINATION="OS=12.1,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" - - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" + - DESTINATION="OS=12.1,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" + - DESTINATION="OS=5.1,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" before_install: - - brew install carthage || true + - brew outdated carthage || brew upgrade carthage || true before_script: - carthage update --cache-builds diff --git a/README.md b/README.md index d93a6f9..9207be3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,9 @@ # RxGitLabKit +[![Build Status](https://travis-ci.org/Qase/RxGitLabKit.svg?branch=master)](https://travis-ci.org/Qase/RxGitLabKit) +[![Platform](https://img.shields.io/badge/platform-iOS%20%7C%20macOS%20%7C%20watchOS%20%7C%20tvOS-lightgrey.svg)](https://qase.github.io/RxGitLabKit/) +[![pod](https://img.shields.io/cocoapods/v/RxGitLabKit.svg)](https://cocoapods.org/) +[![Carthage](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Swift Package Manager](https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg)](https://github.com/apple/swift-package-manager) ## Description Swift Reactive [GitLab API](https://gitlab.com/help/api/README.md) v4 client using @@ -11,7 +16,7 @@ This library currently supports these endpoint groups: - [Commits](https://docs.gitlab.com/ee/api/commits.html) - [Group and Project members](https://docs.gitlab.com/ee/api/members.html) -The HTML documentation generated using [Jazzy](https://github.com/realm/jazzy) can be found on GitLab Pages [here](https://dagytran.gitlab.io/RxGitLabKit). +The HTML documentation generated using [Jazzy](https://github.com/realm/jazzy) can be found on GitHub pages [here](https://qase.github.io/RxGitLabKit/). Before running the demo app or the tests, download the dependencies using: ```bash From f24347942c9bd3c35e5e434a7c7ae05f69e631e7 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Tue, 26 Feb 2019 23:11:54 +0100 Subject: [PATCH 04/10] GIT: QTI-912 Testing fixes. --- .travis.yml | 3 +- RxGitLabKit.xcodeproj/project.pbxproj | 8 +++-- .../xcschemes/RxGitLabKit-macOS.xcscheme | 30 ++++++++++--------- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index ab548ab..9894071 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,9 +10,8 @@ env: - DEMO_APP_SCHEME="RxGitLabKitDemoApp" matrix: - DESTINATION="OS=12.1,name=iPhone XS" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" - - DESTINATION="OS=11.4,name=iPhone X" SCHEME="$IOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="YES" - DESTINATION="arch=x86_64" SCHEME="$MACOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" - - DESTINATION="OS=12.1,name=Apple TV 4K" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" + - DESTINATION="OS=12.1,name=Apple TV" SCHEME="$TVOS_FRAMEWORK_SCHEME" RUN_TESTS="YES" BUILD_EXAMPLE="NO" - DESTINATION="OS=5.1,name=Apple Watch Series 4 - 44mm" SCHEME="$WATCHOS_FRAMEWORK_SCHEME" RUN_TESTS="NO" BUILD_EXAMPLE="NO" before_install: diff --git a/RxGitLabKit.xcodeproj/project.pbxproj b/RxGitLabKit.xcodeproj/project.pbxproj index 8667806..c6450ed 100644 --- a/RxGitLabKit.xcodeproj/project.pbxproj +++ b/RxGitLabKit.xcodeproj/project.pbxproj @@ -1869,7 +1869,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "/usr/local/bin/carthage copy-frameworks"; + shellScript = "/usr/local/bin/carthage copy-frameworks\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -3020,6 +3020,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; GCC_NO_COMMON_BLOCKS = YES; @@ -3054,6 +3055,7 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGN_IDENTITY = "-"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -4086,7 +4088,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; @@ -4172,7 +4174,7 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGN_IDENTITY = ""; + CODE_SIGN_IDENTITY = "-"; CODE_SIGN_STYLE = Automatic; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; diff --git a/RxGitLabKit.xcodeproj/xcshareddata/xcschemes/RxGitLabKit-macOS.xcscheme b/RxGitLabKit.xcodeproj/xcshareddata/xcschemes/RxGitLabKit-macOS.xcscheme index 5e0fe58..82ecfea 100644 --- a/RxGitLabKit.xcodeproj/xcshareddata/xcschemes/RxGitLabKit-macOS.xcscheme +++ b/RxGitLabKit.xcodeproj/xcshareddata/xcschemes/RxGitLabKit-macOS.xcscheme @@ -21,7 +21,7 @@ + + + + - - - - Date: Wed, 27 Feb 2019 10:26:12 +0100 Subject: [PATCH 05/10] GIT: QTI-912 No code signing. Caching carthage. --- .travis.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9894071..1e04a79 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,8 @@ os: osx osx_image: xcode10.1 +cache: + directories: + - Carthage env: global: - WORKSPACE=RxGitLabKit.xcworkspace @@ -18,7 +21,15 @@ before_install: - brew outdated carthage || brew upgrade carthage || true before_script: - - carthage update --cache-builds + - if [ $SCHEME == $IOS_FRAMEWORK_SCHEME ]; then + carthage bootstrap --cache-builds --platform ios + elif [ $SCHEME == $MACOS_FRAMEWORK_SCHEME ]; then + carthage bootstrap --cache-builds --platform macos + elif [ $SCHEME == $TVOS_FRAMEWORK_SCHEME ]; then + carthage bootstrap --cache-builds --platform tvos + elif [ $SCHEME == $WATCHOS_FRAMEWORK_SCHEME ]; then + carthage bootstrap --cache-builds --platform watchos + fi script: - set -o pipefail @@ -27,7 +38,7 @@ script: # Build Framework in Release and Run Tests if specified - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES test | xcpretty -f `xcpretty-travis-formatter`; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_REQUIRED=NO test | xcpretty -f `xcpretty-travis-formatter`; else xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`; fi From f269b1ba0ad5f240a31e4ffe05975ccf614b4fad Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Wed, 27 Feb 2019 10:33:22 +0100 Subject: [PATCH 06/10] GIT: QTI-912 YAML multiline fix. --- .travis.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1e04a79..d88bd8e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,8 @@ before_install: - brew outdated carthage || brew upgrade carthage || true before_script: - - if [ $SCHEME == $IOS_FRAMEWORK_SCHEME ]; then + - | + if [ $SCHEME == $IOS_FRAMEWORK_SCHEME ]; then carthage bootstrap --cache-builds --platform ios elif [ $SCHEME == $MACOS_FRAMEWORK_SCHEME ]; then carthage bootstrap --cache-builds --platform macos @@ -37,13 +38,15 @@ script: - xcodebuild -showsdks # Build Framework in Release and Run Tests if specified - - if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_REQUIRED=NO test | xcpretty -f `xcpretty-travis-formatter`; + - | + if [ $RUN_TESTS == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_REQUIRED=NO test | xcpretty -f `xcpretty-travis-formatter` else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`; + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter` fi # Build Example in Debug if specified - - if [ $BUILD_EXAMPLE == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$DEMO_APP_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter`; + - | + if [ $BUILD_EXAMPLE == "YES" ]; then + xcodebuild -workspace "$WORKSPACE" -scheme "$DEMO_APP_SCHEME" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter` fi From b1b582d242501228a0e6098bc2dce46145398ce7 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Wed, 27 Feb 2019 10:37:15 +0100 Subject: [PATCH 07/10] GIT: QTI-912 Cartfile.resolved added. gitignore updated. --- .gitignore | 2 +- Cartfile.resolved | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Cartfile.resolved diff --git a/.gitignore b/.gitignore index 40d2361..2601791 100644 --- a/.gitignore +++ b/.gitignore @@ -53,7 +53,7 @@ playground.xcworkspace # Carthage/Checkouts Carthage/* -Cartfile.resolved +#Cartfile.resolved # fastlane # diff --git a/Cartfile.resolved b/Cartfile.resolved new file mode 100644 index 0000000..5659023 --- /dev/null +++ b/Cartfile.resolved @@ -0,0 +1,2 @@ +github "ReactiveX/RxSwift" "4.4.1" +github "SnapKit/SnapKit" "4.2.0" From 07c015f251f1904c5be0d596017bb5ebbd839a47 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Wed, 27 Feb 2019 10:56:01 +0100 Subject: [PATCH 08/10] GIT: QTI-912 macOS Codesigning fix. --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index d88bd8e..006f83d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,9 +40,9 @@ script: # Build Framework in Release and Run Tests if specified - | if [ $RUN_TESTS == "YES" ]; then - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_REQUIRED=NO test | xcpretty -f `xcpretty-travis-formatter` + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO ENABLE_TESTABILITY=YES CODE_SIGN_IDENTITY="" CODE_SIGN_REQUIRED=NO test | xcpretty -f `xcpretty-travis-formatter` else - xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -f `xcpretty-travis-formatter` + xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO CODE_SIGN_IDENTITY="" CODE_SIGN_REQUIRED=NO build | xcpretty -f `xcpretty-travis-formatter` fi # Build Example in Debug if specified From 27dfd1ba9edb42eb54231e69022c538ffd33827c Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Wed, 27 Feb 2019 11:16:01 +0100 Subject: [PATCH 09/10] GIT: QTI-912 Run Script for macOS and tvOS fixed. --- RxGitLabKit.xcodeproj/project.pbxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RxGitLabKit.xcodeproj/project.pbxproj b/RxGitLabKit.xcodeproj/project.pbxproj index c6450ed..447c68a 100644 --- a/RxGitLabKit.xcodeproj/project.pbxproj +++ b/RxGitLabKit.xcodeproj/project.pbxproj @@ -1620,7 +1620,7 @@ ); inputPaths = ( "$(SRCROOT)/Carthage/Build/tvOS/RxSwift.framework", - "$(SRCROOT)/Carthage/Build/Mac/RxCocoa.framework", + "$(SRCROOT)/Carthage/Build/tvOS/RxCocoa.framework", ); outputFileListPaths = ( ); @@ -1862,8 +1862,8 @@ files = ( ); inputPaths = ( - "$(SRCROOT)/Carthage/Build/iOS/RxSwift.framework", - "$(SRCROOT)/Carthage/Build/iOS/RxCocoa.framework", + "$(SRCROOT)/Carthage/Build/macOS/RxSwift.framework", + "$(SRCROOT)/Carthage/Build/macOS/RxCocoa.framework", ); outputPaths = ( ); From 3b600315799084141405ccf50b4a00c050a5e8e2 Mon Sep 17 00:00:00 2001 From: Dagy Tran Date: Wed, 27 Feb 2019 11:18:43 +0100 Subject: [PATCH 10/10] GIT: QTI-912 Run Script for macOSfixed ... --- RxGitLabKit.xcodeproj/project.pbxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RxGitLabKit.xcodeproj/project.pbxproj b/RxGitLabKit.xcodeproj/project.pbxproj index 447c68a..519ad88 100644 --- a/RxGitLabKit.xcodeproj/project.pbxproj +++ b/RxGitLabKit.xcodeproj/project.pbxproj @@ -1862,8 +1862,8 @@ files = ( ); inputPaths = ( - "$(SRCROOT)/Carthage/Build/macOS/RxSwift.framework", - "$(SRCROOT)/Carthage/Build/macOS/RxCocoa.framework", + "$(SRCROOT)/Carthage/Build/Mac/RxSwift.framework", + "$(SRCROOT)/Carthage/Build/Mac/RxCocoa.framework", ); outputPaths = ( );