Skip to content

Commit

Permalink
Restores publishing of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Håkansson committed Sep 26, 2018
1 parent 27a52b2 commit b052d00
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ branches:
- /^unfinished/.*$/
after_success:
- ./upload.sh
- ./publish-tests.sh
before_install:
- '[ "$TRAVIS_PULL_REQUEST" == "false" ] && openssl aes-256-cbc -K $encrypted_35bfdf5ae630_key -iv $encrypted_35bfdf5ae630_iv -in secring.gpg.enc -out secring.gpg -d || echo "no decryption for pull requests"'
29 changes: 29 additions & 0 deletions publish-tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash
#version: 2018-09-26

repo=dotify.formatter.impl

if [ "$TRAVIS_REPO_SLUG" == "brailleapps/$repo" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" ]; then

echo -e "Publishing tests...\n"

mkdir -p $HOME/$repo/latest
cp -R build/docs/tests $HOME/$repo/tests

cd $HOME
git config --global user.email "[email protected]"
git config --global user.name "travis-ci"
git clone --quiet https://${GH_TOKEN}@github.com/brailleapps/brailleapps.github.io > /dev/null

cd brailleapps.github.io
git rm -rf ./$repo/tests

cp -Rf $HOME/$repo/. ./$repo

git add -f .
git commit -m "Lastest successful travis build of $repo ($TRAVIS_BUILD_NUMBER) auto-pushed to brailleapps.github.io"
git push -fq origin master > /dev/null

echo -e "Published tests to brailleapps.github.io.\n"

fi

0 comments on commit b052d00

Please sign in to comment.