From e7465be6380eac49554d7d783ce91f9a9170546b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C4=83t=C4=83lin=20Mari=C8=99?= Date: Mon, 9 Feb 2015 12:39:44 +0200 Subject: [PATCH] Update `.travis.yml` * Add `io.js` runtime. https://iojs.org/ * Ensure that the `commit_build_changes.sh` script is only executed if the tests pass in all runtimes. --- .travis.yml | 64 ++++++++++++++++++++++++++++++++++------------------- 1 file changed, 41 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 81fb45dda8..079fa73702 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,29 +4,43 @@ after_success: - # If the tests past, Travis will automatically download and execute - # the following script(s). - - # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # The `commit_build_changes.sh` script will run `npm run build`, - # and if that generates changes, it will commit them to the `master` - # branch: - # - # * ensuring that the content from the `dist/` directory is always - # in sync with the rest of the content - # - # * removing the need to execute the build step locally everytime - # a change is made (especially in the case of trivial changes - # such as typos) - # - # Note: The `commit_build_changes.sh` script will only run if the - # commit was made to the `master` branch. - - - curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.0/commit_build_changes.sh" | - bash -s -- --branch "master" - --commands "npm install && npm run build" - --commit-message "Update content from the \`dist\` directory [skip ci]" + # Temporary workaround for: + # https://github.com/travis-ci/travis-ci/issues/929 + + - python travis_after_all.py + - export $(cat .to_export_back) + - | + + # If all the tests pass in all the runtimes, make Travis + # automatically download and execute the following script + + if [ "$BUILD_LEADER" == "YES" ]; then + if [ "$BUILD_AGGREGATE_STATUS" == "others_succeeded" ]; then \ + + # Clean up helper files + rm -rf travis_after_all.py .to_export_back && \ + + # The `commit_build_changes.sh` script will run the build, + # and if that generates changes, it will commit them to the + # `master` branch: + # + # * ensuring that the content from the `dist/` directory + # is always in sync with the rest of the content + # + # * removing the need to execute the build step locally + # everytime a change is made (especially in the case + # of trivial changes such as typos) + # + # Note: The `commit_build_changes.sh` script will only run + # if the commit was made to the `master` branch. + + curl -sSL "https://raw.githubusercontent.com/h5bp-bot/scripts/0.6.1/commit_build_changes.sh" | + bash -s -- --branch "master" \ + --commands "npm install && npm run build" \ + --commit-message "Update content from the \`dist\` directory [skip ci]"; + + fi + fi env: global: @@ -59,6 +73,10 @@ git: language: node_js node_js: + - "iojs" - "0.12" +script: + - curl -sSLo travis_after_all.py https://raw.github.com/dmakhno/travis_after_all/master/travis_after_all.py + sudo: false