machine:
  xcode:
    version: "8.3.2"

dependencies:
  pre:
    - brew update 1> /dev/null 2> /dev/null
    - brew outdated carthage || brew upgrade carthage
    - gem install bundler

test:
  override:
    - ./scripts/macOS.sh
    - ./scripts/iOS.sh
    - ./scripts/tvOS.sh
  post:
    - carthage build --no-skip-current && for platform in Mac iOS tvOS; do test -d Carthage/Build/${platform}/Anchorage.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/Anchorage"

machine:
  xcode:
    version: "8.3.2"

dependencies:
  pre:
    - brew update 1> /dev/null 2> /dev/null
    - brew outdated carthage || brew upgrade carthage
    - gem install bundler

test:
  override:
    - ./scripts/macOS.sh
    - ./scripts/iOS.sh
    - ./scripts/tvOS.sh
  post:
    - carthage build --no-skip-current && for platform in Mac iOS tvOS; do test -d Carthage/Build/${platform}/Anchorage.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/Anchorage"

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

Enable auto-deploy on CircleCI based on tags.
Enable auto-deploy on CircleCI based on tags.
