fixed a travis-ci build script
This commit is contained in:
parent
7082c44f85
commit
4acf403f70
14
.travis.yml
14
.travis.yml
|
@ -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
|
22
deploy.sh
22
deploy.sh
|
@ -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
|
Loading…
Reference in New Issue