-
Notifications
You must be signed in to change notification settings - Fork 35
/
.travis.yml
31 lines (25 loc) · 949 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
dist: trusty
sudo: false
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
before_install:
- pip install coveralls pytest pytest-cov
# command to install dependencies
install: "python setup.py install"
script: py.test
before_deploy:
- function version_gt() { test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1"; } && IFS="'" read _ version _ <<< $(echo "$a" | sed '3q;d' PyBeacon/__init__.py) && export VERSION_FOUND=$(echo $version | awk -F"'" '{print $1}') SHOULD_DEPLOY=0 && echo "Current version':' ${PB_VERSION} and version found':' ${VERSION_FOUND}" && if version_gt $VERSION_FOUND $PB_VERSION; then echo "Latest version ${VERSION_FOUND} will be deployed" && export SHOULD_DEPLOY=1 PB_VERSION=$(echo "${VERSION_FOUND}");fi
deploy:
provider: pypi
distributions: "sdist bdist_wheel"
user: nirmankarta
password: $PYPI_PASSWORD
on:
branch: master
condition: $SHOULD_DEPLOY = 1