]> scripts.mit.edu Git - autoinstalls/mediawiki.git/blob - vendor/zordius/lightncandy/build/travis_push
MediaWiki 1.30.2
[autoinstalls/mediawiki.git] / vendor / zordius / lightncandy / build / travis_push
1 #!/bin/sh
2 echo "DEBUG ENV: ${TRAVIS_JOB_NUMBER} , ${TRAVIS_BUILD_NUMBER} , ${TRAVIS_PULL_REQUEST} ..."
3
4 if [ "${TRAVIS_PULL_REQUEST}" != "false" ]; then
5   echo "This is a PR, skip push."
6   exit 0
7 fi
8
9 if [ "${TRAVIS_BUILD_NUMBER}.1" != "${TRAVIS_JOB_NUMBER}" ]; then
10   echo "Only push documents 1 time... quit."
11   exit 0
12 fi
13
14 # Push coverage report
15 wget https://scrutinizer-ci.com/ocular.phar
16 php ocular.phar code-coverage:upload --format=php-clover coverage.clover
17
18 # Set for all push in this script.
19 git config --global user.name "Travis-CI"
20 git config --global user.email "zordius@yahoo-inc.com"
21
22 # Generate ANSI sample
23 git clone https://github.com/fcambus/ansilove
24 php tests/example_debug.php > example_debug
25 php ansilove/ansilove example_debug
26 git add example_debug.png
27
28 # Push new tests back to this branch
29 git commit -a -m "Auto generated tests from Travis [ci skip]"
30 git push "https://${GHTK}@github.com/zordius/lightncandy.git" HEAD:${TRAVIS_BRANCH} > /dev/null 2>&1
31
32 # Update hash in HandlebarsTest and push back, trigger new tests there.
33 git clone https://github.com/zordius/HandlebarsTest
34 cd HandlebarsTest
35 echo ${TRAVIS_COMMIT} > lightncandy
36 git add lightncandy
37 git commit -a -m "Auto test on zordius/lightncandy@${TRAVIS_COMMIT}"
38 git push "https://${GHTK}@github.com/zordius/HandlebarsTest.git" > /dev/null 2>&1
39 cd ..
40
41 # Generate documents for this branch
42 build/gen_doc
43 cd build/result/docs
44
45 if [ "${TRAVIS_BRANCH}" != "master" ]; then
46   echo "Document will be pushed here: http://zordius.github.io/lightncandy/${TRAVIS_BRANCH}/"
47   cd ..
48   git init
49   git pull --quiet "https://${GHTK}@github.com/zordius/lightncandy.git" gh-pages:master > /dev/null 2>&1
50   rm -rf $TRAVIS_BRANCH
51   mv docs $TRAVIS_BRANCH
52   git add $TRAVIS_BRANCH
53 else  
54   echo "Document will be pushed here: http://zordius.github.io/lightncandy/"
55   git init
56   git add .
57 fi
58
59 git commit -m "Auto deployed to Github Pages from branch ${TRAVIS_BRANCH} @${TRAVIS_COMMIT} [ci skip]"
60 git push --force --quiet "https://${GHTK}@github.com/zordius/lightncandy.git" master:gh-pages > /dev/null 2>&1