Commit 92fcc737 authored by Sam Saccone's avatar Sam Saccone

📟 space => tab

parent dec3151a
...@@ -4,37 +4,37 @@ set -o pipefail ...@@ -4,37 +4,37 @@ set -o pipefail
get_changes () get_changes ()
{ {
git remote add current https://github.com/tastejs/todomvc.git && \ git remote add current https://github.com/tastejs/todomvc.git && \
git fetch --quiet current && \ git fetch --quiet current && \
git diff HEAD origin/master --name-only | awk 'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}' | uniq | grep -v \/\/ | grep examples | awk -F '[/]' '{print "--framework=" $2}' git diff HEAD origin/master --name-only | awk 'BEGIN {FS = "/"}; {print $1 "/" $2 "/" $3}' | uniq | grep -v \/\/ | grep examples | awk -F '[/]' '{print "--framework=" $2}'
} }
if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ] if [ "$TRAVIS_BRANCH" = "master" ] && [ "$TRAVIS_PULL_REQUEST" = "false" ]
then then
git submodule add -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} site > /dev/null 2>&1 git submodule add -b gh-pages https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} site > /dev/null 2>&1
cd site cd site
if git checkout gh-pages; then git checkout -b gh-pages; fi if git checkout gh-pages; then git checkout -b gh-pages; fi
git rm -r . git rm -r .
cp -R ../dist/* . cp -R ../dist/* .
cp ../dist/.* . cp ../dist/.* .
git add -f . git add -f .
git config user.email 'travis@rdrei.net' git config user.email 'travis@rdrei.net'
git config user.name 'TasteBot' git config user.name 'TasteBot'
git commit -am 'update the build files for gh-pages [ci skip]' git commit -am 'update the build files for gh-pages [ci skip]'
# Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token # Any command that using GH_OAUTH_TOKEN must pipe the output to /dev/null to not expose your oauth token
git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages > /dev/null 2>&1 git push https://${GH_OAUTH_TOKEN}@github.com/${GH_OWNER}/${GH_PROJECT_NAME} HEAD:gh-pages > /dev/null 2>&1
else else
changes=$(get_changes) changes=$(get_changes)
if [ "${#changes}" = 0 ] if [ "${#changes}" = 0 ]
then then
exit 0 exit 0
else else
cd tooling && \ cd tooling && \
echo $changes | xargs ./run.sh && \ echo $changes | xargs ./run.sh && \
cd ../tests && \ cd ../tests && \
echo $changes | xargs ./run.sh echo $changes | xargs ./run.sh
fi fi
exit $? exit $?
fi fi
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment