forked from NewFuture/DDNS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.1 KB
/
.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: python
python:
- "2.7"
- "3.7"
os:
- linux
# - osx
before_install:
- if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PYINSTALLER='pyinstaller==3.6';else export PYINSTALLER=pyinstaller;fi
# command to install dependencies
install:
- pip install ${PYINSTALLER}
# command to run tests
script:
- sed -i -e "s/\${BUILD_SOURCEBRANCHNAME}/${TRAVIS_BRANCH}/" -e "s/\${BUILD_DATE}/$(date --iso-8601=seconds)/" run.py
- cp /etc/ssl/certs/ca-certificates.crt cert.pem
- export SSL_CERT_FILE=${PWD}/cert.pem
- pyinstaller --onefile --noconfirm --clean ./.build/ddns.spec
- ./dist/ddns || test -e "config.json"
- ./dist/ddns -h
git:
depth: 2
deploy:
- provider: releases
token: "${GH_TOKEN}"
skip_cleanup: true
cleanup: false
file:
- "dist/ddns"
on:
tags: true
branch: master
python: '3.7'
- provider: pypi
username: newfuture-bot
password: "${PYPI_PWD}"
skip_cleanup: true
cleanup: false
distributions: "sdist bdist_wheel" # Your distributions here
on:
tags: true
branch: master
python: '3.7'