From 7708bb26c383b88f79a60a8737a26d12cdea498d Mon Sep 17 00:00:00 2001 From: Louis Romero Date: Sat, 16 Dec 2017 00:09:52 +0100 Subject: [PATCH 1/5] Add missing import (#60) CATransaction is used below in the file. --- src/private/MDMViewControllerTransitionCoordinator.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/private/MDMViewControllerTransitionCoordinator.m b/src/private/MDMViewControllerTransitionCoordinator.m index 4da369e..d6e1d06 100644 --- a/src/private/MDMViewControllerTransitionCoordinator.m +++ b/src/private/MDMViewControllerTransitionCoordinator.m @@ -16,6 +16,8 @@ #import "MDMViewControllerTransitionCoordinator.h" +#import + #import "MDMTransition.h" @class MDMViewControllerTransitionContextNode; From 09350359468b6e5de09634a67130491761d8fffc Mon Sep 17 00:00:00 2001 From: featherless Date: Mon, 10 Dec 2018 13:26:54 -0500 Subject: [PATCH 2/5] Update bazel workspace to latest versions. (#63) This increases the following versions: - bazel from 0.11 to 0.20.0 - build_bazel_rules_apple from 7ea0557 to 0.9.0 - build_bazel_rules_swift to 0.4.0 (new) - bazel_ios_warnings from v1.0.1 to v2.0.0 - Xcode from 8 to 9. - Swift pinned to 3. - Unit test upgraded to UI tests. - Add 9.3 and 11.2 OS to the travis CI matrix. - Migrate from the bazel runner scripts to the explicit Xcode selection + run pattern used by material-components-ios (https://github.com/material-components/material-components-ios/blob/fe0099d65c4fa67a02d7b842baf16b540bb2fa86/.kokoro#L102) --- .kokoro | 51 ++++++++++++++----- .travis.yml | 16 +++++- BUILD | 9 ++-- Podfile.lock | 10 ++-- WORKSPACE | 33 +++++++++++- .../project.pbxproj | 32 ------------ 6 files changed, 94 insertions(+), 57 deletions(-) diff --git a/.kokoro b/.kokoro index d820c6d..0137311 100755 --- a/.kokoro +++ b/.kokoro @@ -20,7 +20,43 @@ set -e # Display commands to stderr. set -x -KOKORO_RUNNER_VERSION="v3.*" +BAZEL_VERSION="0.20.0" +IOS_MINIMUM_OS="8.0" +IOS_CPUS="i386,x86_64" + +get_xcode_version_from_path() { + path="$1" + cat "$path/version.plist" \ + | grep "CFBundleShortVersionString" -A1 \ + | grep string \ + | cut -d'>' -f2 \ + | cut -d'<' -f1 +} + +run_bazel() { + echo "Running bazel builds..." + + if [ -n "$KOKORO_BUILD_NUMBER" ]; then + bazel version + use_bazel.sh "$BAZEL_VERSION" + bazel version + + # Move into our cloned repo + cd github/repo + fi + + # Run against whichever Xcode is currently selected. + selected_xcode_developer_path=$(xcode-select -p) + selected_xcode_contents_path=$(dirname "$selected_xcode_developer_path") + + xcode_version=$(get_xcode_version_from_path "$selected_xcode_contents_path") + + bazel clean + bazel test //... \ + --xcode_version "$xcode_version" \ + --ios_minimum_os="$IOS_MINIMUM_OS" \ + --ios_multi_cpus="$IOS_CPUS" +} fix_bazel_imports() { if [ -z "$KOKORO_BUILD_NUMBER" ]; then @@ -39,18 +75,7 @@ fix_bazel_imports() { trap reset_imports EXIT } -if [ ! -d .kokoro-ios-runner ]; then - git clone https://github.com/material-foundation/kokoro-ios-runner.git .kokoro-ios-runner -fi - -pushd .kokoro-ios-runner -git fetch > /dev/null -TAG=$(git tag --sort=v:refname -l "$KOKORO_RUNNER_VERSION" | tail -n1) -git checkout "$TAG" > /dev/null -popd - fix_bazel_imports - -./.kokoro-ios-runner/bazel.sh test //:UnitTests 8.1.0 +run_bazel echo "Success!" diff --git a/.travis.yml b/.travis.yml index 6fa9f5e..0186e9f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,23 @@ language: objective-c -osx_image: xcode8.1 sudo: false +env: + global: + - LC_CTYPE=en_US.UTF-8 + - LANG=en_US.UTF-8 + - LANGUAGE=en_US.UTF-8 +matrix: + include: + - osx_image: xcode9.2 + env: COVERAGE=code_coverage SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=11.2" + - osx_image: xcode9.2 + env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=10.3.1" + - osx_image: xcode9.2 + env: SDK="iphonesimulator11.2" DESTINATION="name=iPhone 6s,OS=9.3" before_install: - gem install cocoapods --no-rdoc --no-ri --no-document --quiet - pod install --repo-update script: - set -o pipefail - - xcodebuild build -workspace MotionTransitioning.xcworkspace -scheme TransitionsCatalog -sdk "iphonesimulator10.1" -destination "name=iPhone 6s,OS=10.1" ONLY_ACTIVE_ARCH=YES | xcpretty -c; + - xcodebuild test -workspace MotionTransitioning.xcworkspace -scheme TransitionsCatalog -sdk "$SDK" -destination "$DESTINATION" ONLY_ACTIVE_ARCH=YES | xcpretty -c; after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/BUILD b/BUILD index c77a8fc..c1f3288 100644 --- a/BUILD +++ b/BUILD @@ -19,6 +19,8 @@ licenses(["notice"]) # Apache 2.0 exports_files(["LICENSE"]) +load("@build_bazel_rules_apple//apple:ios.bzl", "ios_ui_test") +load("@build_bazel_rules_swift//swift:swift.bzl", "swift_library") load("@bazel_ios_warnings//:strict_warnings_objc_library.bzl", "strict_warnings_objc_library") strict_warnings_objc_library( @@ -36,8 +38,6 @@ strict_warnings_objc_library( visibility = ["//visibility:public"], ) -load("@build_bazel_rules_apple//apple:swift.bzl", "swift_library") - swift_library( name = "UnitTestsSwiftLib", srcs = glob([ @@ -57,14 +57,13 @@ objc_library( visibility = ["//visibility:private"], ) -load("@build_bazel_rules_apple//apple:ios.bzl", "ios_unit_test") - -ios_unit_test( +ios_ui_test( name = "UnitTests", deps = [ ":UnitTestsLib", ":UnitTestsSwiftLib" ], + test_host = "@build_bazel_rules_apple//apple/testing/default_host/ios", minimum_os_version = "8.0", timeout = "short", visibility = ["//visibility:private"], diff --git a/Podfile.lock b/Podfile.lock index 3250e19..9fb31ad 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -6,14 +6,18 @@ DEPENDENCIES: - CatalogByConvention - MotionTransitioning (from `./`) +SPEC REPOS: + https://github.com/cocoapods/specs.git: + - CatalogByConvention + EXTERNAL SOURCES: MotionTransitioning: - :path: ./ + :path: "./" SPEC CHECKSUMS: CatalogByConvention: c3a5319de04250a7cd4649127fcfca5fe3322a43 - MotionTransitioning: 23d25edc2f4606efb922403cbac6d81af37aa33a + MotionTransitioning: 42968eefaeb185d70dad5d891bf1229e84c0ccc9 PODFILE CHECKSUM: 25d5942fb7698339a03667bb46c3fbb77529b92d -COCOAPODS: 1.3.1 +COCOAPODS: 1.5.3 diff --git a/WORKSPACE b/WORKSPACE index 722a7a4..7b1a5be 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -12,14 +12,43 @@ # See the License for the specific language governing permissions and # limitations under the License. +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") + git_repository( name = "build_bazel_rules_apple", remote = "https://github.com/bazelbuild/rules_apple.git", - commit = "7ea0557", + tag = "0.9.0", +) + +load( + "@build_bazel_rules_apple//apple:repositories.bzl", + "apple_rules_dependencies", +) + +apple_rules_dependencies() + +git_repository( + name = "build_bazel_rules_swift", + remote = "https://github.com/bazelbuild/rules_swift.git", + tag = "0.4.0", +) + +load( + "@build_bazel_rules_swift//swift:repositories.bzl", + "swift_rules_dependencies", ) +swift_rules_dependencies() + git_repository( name = "bazel_ios_warnings", remote = "https://github.com/material-foundation/bazel_ios_warnings.git", - tag = "v1.0.1", + tag = "v2.0.0", +) + +http_file( + name = "xctestrunner", + executable = 1, + urls = ["https://github.com/google/xctestrunner/releases/download/0.2.5/ios_test_runner.par"], ) diff --git a/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj b/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj index ad8ec3e..64abc93 100644 --- a/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj +++ b/examples/apps/Catalog/TransitionsCatalog.xcodeproj/project.pbxproj @@ -369,7 +369,6 @@ 666FAA7E1D384A6B000363DA /* Resources */, 332B5EA9D6D03DB5A5EC0149 /* Frameworks */, EBE92D1BA3D06BD67925A4E0 /* [CP] Embed Pods Frameworks */, - 8FFB1F82A9D08AF069E44DFB /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -389,7 +388,6 @@ 666FAA921D384A6B000363DA /* Resources */, 03BB10DAA9B410FC78A061DE /* Frameworks */, B07B7D3E33EA12345D5D53CC /* [CP] Embed Pods Frameworks */, - 560BE48F7F0BF2FEBC8AF290 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -494,36 +492,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 560BE48F7F0BF2FEBC8AF290 /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/../../../Pods/Target Support Files/Pods-UnitTests/Pods-UnitTests-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - 8FFB1F82A9D08AF069E44DFB /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/../../../Pods/Target Support Files/Pods-TransitionsCatalog/Pods-TransitionsCatalog-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; 98D73D231683AA2871B76D81 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; From 25a623b48d1e27077de813a602fa2832afb787fa Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 10 Dec 2018 13:27:48 -0500 Subject: [PATCH 3/5] Automatic changelog preparation for release. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60ccc95..5218764 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# #develop# + + TODO: Enumerate changes. + + # 5.0.0 This major change introduces a breaking API change for Swift clients. From 4d4d9629e0515b83f4bb7a6dffb0208cf6276800 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 10 Dec 2018 13:29:01 -0500 Subject: [PATCH 4/5] Update changelog. --- CHANGELOG.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5218764..ce56097 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,16 @@ -# #develop# +# 6.0.0 - TODO: Enumerate changes. +This major release upgrades the bazel dependencies and workspace. This change is breaking for anyone +using bazel to build this library. In order to use this library with bazel, you will also need to +upgrade your workspace versions to match the ones now used in this library's `WORKSPACE` file. +## Source changes + +* [Add missing import (#60)](https://github.com/material-motion/motion-transitioning-objc/commit/7708bb26c383b88f79a60a8737a26d12cdea498d) (Louis Romero) + +## Non-source changes + +* [Update bazel workspace to latest versions. (#63)](https://github.com/material-motion/motion-transitioning-objc/commit/09350359468b6e5de09634a67130491761d8fffc) (featherless) # 5.0.0 From 02d98df13bd874acfc6b51bccd184bcb627fedfa Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Mon, 10 Dec 2018 13:29:43 -0500 Subject: [PATCH 5/5] Bump the release. --- MotionTransitioning.podspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MotionTransitioning.podspec b/MotionTransitioning.podspec index 939e6f3..cfd45fa 100644 --- a/MotionTransitioning.podspec +++ b/MotionTransitioning.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "MotionTransitioning" s.summary = "Light-weight API for building UIViewController transitions." - s.version = "5.0.0" + s.version = "6.0.0" s.authors = "The Material Motion Authors" s.license = "Apache 2.0" s.homepage = "https://github.com/material-motion/transitioning-objc"