diff --git a/package.json b/package.json index cf0b9249f4..ae8657fe87 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "prebuildifier": "bazel build --noshow_progress @com_github_bazelbuild_buildtools//buildifier", "buildifier": "find . -type f \\( -name BUILD -or -name BUILD.bazel \\) ! -path \"*/node_modules/*\" | xargs $(bazel info bazel-bin)/external/com_github_bazelbuild_buildtools/buildifier/buildifier", "preinstall": "node tools/yarn/check-yarn.js", - "postinstall": "yarn update-webdriver", + "postinstall": "yarn update-webdriver; node ./tools/postinstall-patches.js", "update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG", "check-env": "gulp check-env" }, @@ -96,7 +96,7 @@ "rollup-plugin-sourcemaps": "0.4.2", "selenium-webdriver": "3.5.0", "semver": "5.4.1", - "shelljs": "^0.7.8", + "shelljs": "^0.8.1", "source-map": "0.5.7", "source-map-support": "0.4.18", "systemjs": "0.18.10", diff --git a/scripts/ci/install.sh b/scripts/ci/install.sh index 024f20ec5f..1490cb0efa 100755 --- a/scripts/ci/install.sh +++ b/scripts/ci/install.sh @@ -37,7 +37,7 @@ travisFoldEnd "install-yarn" # Install all npm dependencies according to yarn.lock travisFoldStart "yarn-install" - (node tools/npm/check-node-modules --purge && yarn update-webdriver) || yarn install --frozen-lockfile --non-interactive + (node tools/npm/check-node-modules --purge && yarn postinstall) || yarn install --frozen-lockfile --non-interactive travisFoldEnd "yarn-install" diff --git a/tools/postinstall-patches.js b/tools/postinstall-patches.js new file mode 100644 index 0000000000..4638fff435 --- /dev/null +++ b/tools/postinstall-patches.js @@ -0,0 +1,13 @@ +const {set, cd, sed} = require('shelljs'); +const path = require('path'); + +console.log('===== about to run the postinstall.js script ====='); +// fail on first error +set('-e'); +// print commands as being executed +set('-v'); +// jump to project root +cd(path.join(__dirname, '../')); + + +console.log('===== finished running the postinstall.js script ====='); diff --git a/yarn.lock b/yarn.lock index 3f58f8a07b..506c26b20e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6420,9 +6420,9 @@ shell-quote@1.6.1: array-reduce "~0.0.0" jsonify "~0.0.0" -shelljs@^0.7.8: - version "0.7.8" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.8.tgz#decbcf874b0d1e5fb72e14b164a9683048e9acb3" +shelljs@^0.8.1: + version "0.8.1" + resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.1.tgz#729e038c413a2254c4078b95ed46e0397154a9f1" dependencies: glob "^7.0.0" interpret "^1.0.0"