dependencies:
  override:
    - pip install -r requirements.txt
    - pip install pycrypto
test:
  override:
    - coverage run manage.py test
general:
  artifacts:
    - 'coverage'
deployment:
  # production:
  #   branch: master
  #   commands:
  #     - fab deploy
  production:
    branch: master
    commands:
      - |
        cat >~/.netrc <<EOF
        machine api.heroku.com
          login $HEROKU_EMAIL
          password $HEROKU_TOKEN
        machine git.heroku.com
          login $HEROKU_EMAIL
          password $HEROKU_TOKEN
        EOF
      - chmod 600 ~/.netrc # Heroku cli complains about permissions without this
      - "[[ ! -s \"$(git rev-parse --git-dir)/shallow\" ]] || git fetch --unshallow"
      - heroku maintenance:on --app staging-speakerfight
      - heroku scale web=0 --app staging-speakerfight
      - git push git@heroku.com:staging-speakerfight.git $CIRCLE_SHA1:refs/heads/master
      - heroku run python manage.py migrate --app staging-speakerfight
      - heroku run python manage.py compilemessages --app staging-speakerfight
      - heroku scale web=1 --app staging-speakerfight
      - heroku maintenance:off --app staging-speakerfight

dependencies:
  override:
    - pip install -r requirements.txt
    - pip install pycrypto
test:
  override:
    - coverage run manage.py test
general:
  artifacts:
    - 'coverage'
# deployment:
  # production:
  #   branch: master
  #   commands:
  #     - fab deploy
Stop deploying on heroku due to installation issues.
Stop deploying on heroku due to installation issues.
