machine:
  xcode:
    version: "9.0"

dependencies:
  pre:
    - brew update 1> /dev/null 2> /dev/null
    - brew outdated carthage || (brew uninstall carthage --force; HOMEBREW_NO_AUTO_UPDATE=1 brew install carthage --force-bottle)
    - gem install bundler
test:
  override:
    - ./scripts/macOS.sh
    - ./scripts/iOS-11.0.sh
    - ./scripts/iOS-10.3.1.sh
    - ./scripts/tvOS-11.0.sh
    - ./scripts/tvOS-10.2.sh
    - ./scripts/watchOS-4.0.sh
  post:
    - carthage build --no-skip-current && for platform in Mac iOS tvOS watchOS; do test -d Carthage/Build/${platform}/BonMot.framework || exit 1; done
    # This is to work around the fact that CocoaPods wants to set up the master CocoaPods specs
    # repo on pod lib lint, which takes several minutes on CircleCI. Without dependancies, this
    # isn't a nescessary step. We can point it at any other (smaller) Git repo to speed up this
    # step significantly. Because recursion is fun, let's point it at ourselves.
    # Relevant CocoaPods bug: https://github.com/CocoaPods/CocoaPods/issues/6154
    - bundle exec pod lib lint --sources="https://github.com/Raizlabs/BonMot"

machine:
  xcode:
    version: "9.0"

dependencies:
  pre:
    - brew update 1> /dev/null 2> /dev/null
    - brew outdated carthage || (brew uninstall carthage --force; HOMEBREW_NO_AUTO_UPDATE=1 brew install carthage --force-bottle)
    - gem install bundler
test:
  override:
    - ./scripts/macOS.sh
    - ./scripts/iOS-11.0.sh
    - ./scripts/iOS-10.3.1.sh
    - ./scripts/tvOS-11.0.sh
    - ./scripts/tvOS-10.2.sh
    - ./scripts/watchOS-4.0.sh
  post:
    - carthage build --no-skip-current && for platform in Mac iOS tvOS watchOS; do test -d Carthage/Build/${platform}/BonMot.framework || exit 1; done
    # This is to work around the fact that CocoaPods wants to set up the master CocoaPods specs
    # repo on pod lib lint, which takes several minutes on CircleCI. Without dependancies, this
    # isn't a nescessary step. We can point it at any other (smaller) Git repo to speed up this
    # step significantly. Because recursion is fun, let's point it at ourselves.
    # Relevant CocoaPods bug: https://github.com/CocoaPods/CocoaPods/issues/6154
    - bundle exec pod lib lint --sources="https://github.com/Raizlabs/BonMot"

deployment:
    release:
        tag: /\d+(\.\d+)*(\..*)*/
    commands:
        - bundle exec pod trunk push

Support automatic CocoaPods trunk deploy upon tag push.
Support automatic CocoaPods trunk deploy upon tag push.
