mdcat 0.9.0

cat for markdown: Show markdown documents in terminals
Documentation
sudo: false
language: rust
cache: cargo

# Default script for test stage
script:
  - cargo build --verbose
  - cargo test --verbose
  # Make sure that we can format w/o panic or error
  - cargo run -- sample/common-mark.md

.deploy-settings:

# Check formatting before running tests, and lint afterwards
stages:
  - formatting
  - test
  - lint
  - release
jobs:
  fast_finish: true
  include:
      # Check formatting on rust stable before anything else
    - stage: formatting
      os: linux
      rust: stable
      before_install: rustup component add rustfmt-preview
      script: cargo fmt -- --check

    # Base line for backwards compatibility
    - stage: test
      os: linux
      rust: '1.27.2'
    # Our target Rust version
    - stage: test
      os: linux
      rust: stable
    - stage: test
      os: osx
      rust: stable
    # Catch regressions in beta and nightly
    - stage: test
      os: linux
      rust: beta
    - stage: test
      os: linux
      rust: nightly

    # Run clippy after testing, with a pinned clippy version and a compatible
    # nightly snapshot
    - stage: lint
      os: linux
      rust: nightly
      before_install: rustup component add clippy-preview
      script: cargo clippy

    # Deploy binary to GitHub
    - &deploy-settings
      stage: release
      # Our release tags start with "mdcat-", so we only build for such tags
      if: tag =~ ^mdcat-
      os: linux
      env: ARCHIVE_NAME=${TRAVIS_TAG}-${TRAVIS_OS_NAME}
      rust: stable
      # Inhibit Travis’ default "cargo build --verbose" install step because we
      # make an explicit release build in the "script" phase
      install: ""
      # Exclude iterm2 from release artifacts on Linux
      script: cargo build --no-default-features --feature terminology --release --verbose
      before_deploy:
        - echo "Building ${ARCHIVE_NAME}"
        - mkdir "/tmp/${ARCHIVE_NAME}"
        - cp README.md CHANGELOG.md LICENSE "/tmp/${ARCHIVE_NAME}"
        - cp target/release/mdcat "/tmp/${ARCHIVE_NAME}"
        # Strip the binary to reduce its size
        - strip "/tmp/${ARCHIVE_NAME}/mdcat"
        - tar -czf "/tmp/${ARCHIVE_NAME}.tar.gz" -C /tmp/ "${ARCHIVE_NAME}"
      deploy:
        skip_cleanup: true
        provider: releases
        api_key:
          secure: evXKPmDHaIxS2DEx357DPHbA5LzMBzCwYos6IVQmqFC3L3/Iz3vBo9/DZ2ZO14b72JIqps/t3vTpXvCPSK/L+LUcCger3fQUpvCMusPzQbldJhifyOdaU5SfAAu7/SetEbalEN0Xzp289HWrQgcJAeoUePwXEYitbvz68HP3cPoAmDM/Mlp+7bdfivt99xTBAH2BVa42pmaUO1itmdnAGpj4IoBDpw8nsCjmWVTjhzsP7O5HPx+36JwdhKeGYO+cP9/Ja4rOaPe5vJNHJLlUcyosXCZyZ+9p/6EZN0TJJnXIuGnkugm6BHYP2PiOwadCKMnd4FQCqLPEAm59OSo7yTtDtJRGTpMlJz59s+GPIG2EiFxhPWD0tL8QVMRP9QUKHPqFBCTPDgcDOW10PzGJtkIE1fEUZ4primoQ6GsPtxEsHY9wSkZ2bL/teRF1i3E6X1aHVUp/7lNBdNqFyXbzfR4Av2pkw8cQrJjVesHDNiV3XkxZr4AMUh356BsemECnvcvurWJEElU86HoNg5VRFLjjHqp4EIck+QjH5WejW/nbg7SWdGvLK1gOPXPxznn5J7trCGj1ULyzwrTYlVw9O4A+yJmOis3BRxzuOS0pNKh/yRdsEF/f+DcoAqBTHQLGGcjNmBF0R5PbJGPO7bY9spjt/g57QT2iwQ03klbu/ns=
        file: /tmp/${ARCHIVE_NAME}.tar.gz
    - <<: *deploy-settings
      os: osx
      # Only include iterm2 when building for macos
      script: cargo build --no-default-features --feature iterm2 --release --verbose