snapdrop/travis-runner.sh
2015-12-18 16:50:36 +01:00

18 lines
632 B
Bash
Executable file

#!/bin/bash
set -o pipefail
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]
then
git config --global user.email "samccone@gmail.com" && \
git config --global user.name "auto deployer" && \
echo "Deploying!" && \
sed -i.tmp "s/\/\/ app.baseUrl = '\/polymer-starter-kit/app.baseUrl = '\/polymer-starter-kit/" app/scripts/app.js && \
rm app/scripts/app.js.tmp && \
bower i && \
gulp build-deploy-gh-pages && \
sed -i.tmp "s/app.baseUrl = '\/polymer-starter-kit/\/\/ app.baseUrl = '\/polymer-starter-kit/" app/scripts/app.js && \
rm app/scripts/app.js.tmp
else
npm run lint
npm test
fi