machine:
  python:
    version: 3.5.2
  environment:
    GIT_AUTHOR_NAME: Pior Bastida
    GIT_AUTHOR_EMAIL: pior@pbastida.net
    GIT_COMITTER_NAME: Pior Bastida
    GIT_COMITTER_EMAIL: pior@pbastida.net

test:
  pre:
    - pip install -r requirements-test.txt
  override:
    - pytest --cov-report xml:$CIRCLE_ARTIFACTS/pytest/coverage.xml --junitxml=$CIRCLE_TEST_REPORTS/pytest/junit.xml
    - pylama

deployment:
  pypi:
    branch: pypi
    commands:
      - pip install -U wheel bumpversion twine
      - bumpversion patch --commit --tag
      - git push origin pypi --tags
      - git checkout master
      - git pull origin
      - git merge pypi
      - git push origin master --tags
      - python setup.py sdist bdist_wheel
      - twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*

machine:
  python:
    version: 3.5.2

test:
  pre:
    - pip install -r requirements-test.txt
  override:
    - pytest --cov-report xml:$CIRCLE_ARTIFACTS/pytest/coverage.xml --junitxml=$CIRCLE_TEST_REPORTS/pytest/junit.xml
    - pylama

deployment:
  pypi:
    branch: pypi
    commands:
      - pip install -U wheel bumpversion twine
      - git config --global user.email "pior@pbastida.net"
      - git config --global user.name "Pior Bastida (CircleCI)"
      - bumpversion patch --commit --tag
      - git push origin pypi --tags
      - git checkout master
      - git pull origin
      - git merge pypi
      - git push origin master --tags
      - python setup.py sdist bdist_wheel
      - twine upload -u $PYPI_USERNAME -p $PYPI_PASSWORD dist/*

Revert non-working git author config by vars
Revert non-working git author config by vars
