fixed a travis-ci build script

This commit is contained in:
Nikolay Kartyshov 2017-07-14 15:20:15 +03:00
parent 7082c44f85
commit 4acf403f70
2 changed files with 12 additions and 24 deletions

View File

@ -1,4 +1,14 @@
language: bash
language: python
python:
- "2.7"
script:
- bash deploy.sh
- python Filters/parser.py
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN
on:
branch: master

View File

@ -1,22 +0,0 @@
#!/bin/bash
#if [ "$TRAVIS_COMMIT_MESSAGE" == "Auto update filters" ]
#then
# exit 0
#fi
python Filters/parser.py
if [[ $? = 0 ]]; then
git config --global user.name "Travis CI"
git config --global user.email "travis@travis-ci.org"
git config --global push.default simple
git remote add deploy "https://$GITHUB_TOKEN@github.com/AdguardTeam/AdguardDNS.git"
git fetch deploy
git commit -a -m "Auto update filters"
git push -q deploy HEAD:master
else
echo "failure: $?"
exit 1
fi