machine:
  environment:
    RUST_VERSION: 1.13.0

checkout:
  post:
    # Work around some silly configuration added by Circle that doesn't actually even do what they want it to.
    - git config --global --unset url.ssh://git@github.com:.insteadof

dependencies:
  post:
    - mkdir -p ~/cache/
    - 'if [[ ! -f ~/cache/rust-$RUST_VERSION.tar.gz ]]; then curl -SsL https://static.rust-lang.org/dist/rust-$RUST_VERSION-x86_64-unknown-linux-gnu.tar.gz -o ~/cache/rust-$RUST_VERSION.tar.gz; fi'
    - 'mkdir -p ~/opt/rust-$RUST_VERSION && cd ~/opt/rust-$RUST_VERSION && tar -xz -f ~/cache/rust-$RUST_VERSION.tar.gz --strip-components 1 && chmod a+x install.sh && ./install.sh --prefix=$HOME'
  cache_directories:
    - ~/cache/

test:
  override:
    - cargo test --locked

deployment:
  documentation:
    branch: master
    commands:
      - git worktree add -b gh-pages target/doc origin/gh-pages
      - cargo doc --no-deps
      - 'cd target/doc && git add . && git commit -m "Updated documentation build." && git push origin gh-pages'

general:
  branches:
    ignore:
      - gh-pages # Don't run builds against HTML...

machine:
  environment:
    RUST_VERSION: 1.13.0

checkout:
  post:
    # Work around some silly configuration added by Circle that doesn't actually even do what they want it to.
    - git config --global --unset url.ssh://git@github.com:.insteadof

dependencies:
  post:
    - mkdir -p ~/cache/
    - 'if [[ ! -f ~/cache/rust-$RUST_VERSION.tar.gz ]]; then curl -SsL https://static.rust-lang.org/dist/rust-$RUST_VERSION-x86_64-unknown-linux-gnu.tar.gz -o ~/cache/rust-$RUST_VERSION.tar.gz; fi'
    - 'mkdir -p ~/opt/rust-$RUST_VERSION && cd ~/opt/rust-$RUST_VERSION && tar -xz -f ~/cache/rust-$RUST_VERSION.tar.gz --strip-components 1 && chmod a+x install.sh && ./install.sh --prefix=$HOME'
  cache_directories:
    - ~/cache/

test:
  override:
    - cargo test --locked

deployment:
  documentation:
    branch: master
    commands:
      - git worktree add -b gh-pages target/doc origin/gh-pages
      - cargo doc --no-deps
      - 'git config user.name "CircleCI" && git config user.email "matt.scharley+circleci@gmail.com"'
      - 'cd target/doc && git add . && git commit -m "Updated documentation build." && git push origin gh-pages'

general:
  branches:
    ignore:
      - gh-pages # Don't run builds against HTML...

Add git identification to the build
Add git identification to the build
