123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- if [[ "$TRAVIS_PULL_REQUEST" == "false" && "$TRAVIS_TEST_RESULT" == "0" ]]; then
- echo -e "Starting to update of dist folder\n"
-
- git config --global user.email "travis@travis-ci.org"
- git config --global user.name "Travis"
- cd $HOME
-
- git clone --quiet https://${GH_TOKEN}@github.com/skulpt/skulpt.git skulpt
-
- git clone --quiet https://${GH_TOKEN}@github.com/skulpt/skulpt-dist.git dist
-
- cd $HOME
- cd skulpt
- git tag > ../tags-skulpt
- cd ../dist
- git tag > ../tags-dist
- cd ..
-
-
-
-
-
-
-
-
-
- grep -Fxvf tags-dist tags-skulpt > new-tags
- for TAG in $(cut -d, -f2 < new-tags)
- do
- echo "Found new tag: $TAG"
-
- export NEWTAG=true
-
- cd $HOME/skulpt
- git checkout tags/$TAG
- npm install jscs
- npm install git://github.com/jshint/jshint/
- ./skulpt.py dist -u
-
- cd dist
- tar -czf skulpt-latest.tar.gz *.js
- zip skulpt-latest.zip *.js
- mkdir -p ../doc/static/dist
- mv *.zip ../doc/static/dist/
- mv *.tar.gz ../doc/static/dist/
-
- cp skulpt.min.js ../doc/static/
- cp skulpt-stdlib.js ../doc/static/
- cp *.js ../../dist/
- cd ..
- cp bower.json ../dist
- cp .bowerrc ../dist
-
- cd ../dist
- git add .
- git commit -m "Skulpt version: $TAG"
- git tag $TAG
- git push -fq --tags origin master > /dev/null
- done
-
- cd $HOME
- cd dist
- git reset HEAD --hard
- cd $HOME
-
- cd skulpt
- git reset HEAD --hard
- ./skulpt.py dist -u
- cd dist
- cp *.js ../../dist/
- cd ..
- cp bower.json ../dist
- cp .bowerrc ../dist
-
- cd ../dist
- git add .
- git commit -m "Travis build $TRAVIS_BUILD_NUMBER pushed"
- git push -fq origin master > /dev/null
- if [[ "$NEWTAG" == "true" ]]; then
- echo "Download GAE"
- wget http://googleappengine.googlecode.com/files/google_appengine_1.8.3.zip -nv
- unzip -qd ~/vendors google_appengine_1.8.3.zip
-
- if [ ! -f ~/vendors/google_appengine/appcfg.py ]; then
- echo "can't find appcfg.py"
- exit 1
- fi
- echo "Updating site"
- cd $HOME/skulpt/doc
- ~/vendors/google_appengine/appcfg.py --oauth2_refresh_token=${GAE_REFRESH} update ./
- echo "Successfully updated skulpt.org"
- fi
- echo -e "Done magic with coverage\n"
- else
- echo -e "Not updating dist folder because TRAVIS_PULL_REQUEST = $TRAVIS_PULL_REQUEST and TRAVIS_TEST_RESULT = $TRAVIS_TEST_RESULT"
- fi
|