forked from rcwoolley/device-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-pages.sh
More file actions
executable file
·34 lines (27 loc) · 798 Bytes
/
deploy-pages.sh
File metadata and controls
executable file
·34 lines (27 loc) · 798 Bytes
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
#!/bin/bash
set -o errexit -o nounset
# only run cov on one version of python.
# only run this if cron triggered it
if [ "$TRAVIS_PYTHON_VERSION" = "2.7" ]; then
if [ "$TRAVS_EVENT_TYPE" = "cron" ]; then
pytest --cov-report=html --cov=device_cloud --cov-config .coveragerc -v .
rev=$(git rev-parse --short HEAD)
if [ -d "htmlcov" ]; then
cd htmlcov
git init
git config user.name "Paul Barrette"
git config user.email "paulbarrette@gmail.com"
git remote add upstream "https://$GH_TOKEN@github.com/Wind-River/hdc-python.git"
git fetch upstream
git reset upstream/gh-pages
touch .
git add -A .
git commit -m "HDC Python coverage data at ${rev}"
git push -q upstream HEAD:gh-pages
else
echo "Error: no htmlcov directory"
exit 1
fi
fi
fi
exit 0