Skip to content

Commit

Permalink
Fix deploy.sh script
Browse files Browse the repository at this point in the history
 - *should* work now
 - exposed token should be resolved
 - better informational printing and error notifications
 - .travis.yml updated under the assumption that @szaghi moved to web interface for encrypted variables
 - removed empty .gitignore added when demonstrating security breach
  • Loading branch information
zbeekman committed Jul 1, 2015
1 parent 66169f3 commit 8829f2f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ python:

env:
global:
- secure: ZfUM5EuWFnPXgyw7M/dz4deW8qmxGsrCZTSeeLUeJj6lQ/zhM9Dn259IL4SuA3Neji6WOLqm6Z7SmXjm7ieFmn2/Fshuz1KWsGe8XdHDm8PUsfj1XVOpZBKqyPLUv2CPxR+V22fDaAUX3UlWdaFhsWYJzVo3GYX2fJtshFjKDJw=
- APT_DEPENDS="gfortran-4.9 binutils"
- PIP_DEPENDS="FoBiS.py markdown-checklist ford"
- SCRIPT="FoBiS.py rule -ex makecoverage"
Expand Down
23 changes: 12 additions & 11 deletions makedoc.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
#!/bin/bash
set -ev # echo what we're doing and fail on errors
GITREPO=$1
FoBiS.py rule -ex makedoc
git config --global user.name "Stefano Zaghi"
git config --global user.email "stefano.zaghi@gmail.com"
if [[ "${TRAVIS}" = "true" && "${TRAVIS_PULL_REQUEST}" != "false" ]]; then
# Running under travis during a PR. No access to GH_TOKEN so abort
# documentation deployment, without throwing an error
FoBiS.py rule -ex makedoc
exit 0
else
# either we are not on TRAVIS and maybe you want to manually dpeloy documentation
# or we are on TRAVIS but not testing a PR so it is safe to deploy documentation
git config --global user.name "Stefano Zaghi"
git config --global user.email "stefano.zaghi@gmail.com"
git clone --branch=gh-pages https://${GH_TOKEN}@github.com/szaghi/$GITREPO doc/html
cd doc/html
git add -f --all *
git commit -m "Travis CI autocommit from travis build ${TRAVIS_BUILD_NUMBER}"
git push -f origin gh-pages
fi
# either we are not on TRAVIS and maybe you want to manually dpeloy documentation
# or we are on TRAVIS but not testing a PR so it is safe to deploy documentation
git clone --branch=gh-pages https://${GH_TOKEN}@github.com/szaghi/$GITREPO doc/html
FoBiS.py rule -ex makedoc
cd doc/html
git add -f --all './*'
git commit -m "Travis CI autocommit from travis build ${TRAVIS_BUILD_NUMBER}"
git push -f origin gh-pages

0 comments on commit 8829f2f

Please sign in to comment.