8
0
Quellcode durchsuchen

Checking whether the build will fail if the script fails.

Kamil Piechaczek vor 7 Jahren
Ursprung
Commit
815cb32f8e
2 geänderte Dateien mit 9 neuen und 3 gelöschten Zeilen
  1. 3 2
      .travis.yml
  2. 6 1
      scripts/docs/build-and-publish-nightly.js

+ 3 - 2
.travis.yml

@@ -21,8 +21,9 @@ install:
 script:
   - npm t -- --reporter=dots
   - npm run docs:api -- --validate-only
-after_success:
-  - travis_wait npm run docs:build-and-publish-nightly
+  - 'if [ $TRAVIS_TEST_RESULT -eq 0 ]; then
+  		travis_wait npm run docs:build-and-publish-nightly;
+	fi'
 notifications:
   slack:
     rooms:

+ 6 - 1
scripts/docs/build-and-publish-nightly.js

@@ -15,6 +15,11 @@ This script is to be used on CI to automatically update https://ckeditor5.github
 
 */
 
+const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
+
+console.log( 'This build should fail.' );
+console.log( exec( 'this-command-should-fail-because-it-should-not-exist' ) );
+
 // Build the documentation only when master branch is updated.
 if ( process.env.TRAVIS_BRANCH !== 'master' ) {
 	process.exit();
@@ -26,7 +31,7 @@ if ( process.env.TRAVIS_EVENT_TYPE !== 'cron' ) {
 }
 
 const path = require( 'path' );
-const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
+// const { tools } = require( '@ckeditor/ckeditor5-dev-utils' );
 
 const mainRepoUrl = 'https://github.com/CKEditor5/ckeditor5.github.io';