From 78ada980a627ab9b380e667ed08be241c907fe34 Mon Sep 17 00:00:00 2001 From: Paul Gschwendtner Date: Thu, 3 Oct 2019 12:37:41 +0200 Subject: [PATCH] ci: avoid postinstall error when building material-unit-tests job (#32889) The components repository updated to rules_nodejs#0.38.0 before Angular Bazel did. To do this, the `@angular/bazel` v0.38.0 compatibility changes were patched on postinstall. This now conflicts because we install a `@angular/bazel` version in the `material-unit-tests` job that already includes these compatibility changes. This would result in the patch being a noop for which the `patch` command throws an error. We can remove this once components can install a released version of `@angular/bazel` that is compatible with `rules_nodejs#0.38.0`. PR Close #32889 --- scripts/ci/run_angular_material_unit_tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/ci/run_angular_material_unit_tests.sh b/scripts/ci/run_angular_material_unit_tests.sh index 025d1b3cf8..2f6f2e709b 100755 --- a/scripts/ci/run_angular_material_unit_tests.sh +++ b/scripts/ci/run_angular_material_unit_tests.sh @@ -14,6 +14,14 @@ angular_dir=$(pwd) sed -i'.bak' "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" ${MATERIAL_REPO_TMP_DIR}/tools/defaults.bzl sed -i'.bak' "s/\(\"ivyTemplateTypeCheck\": \)False/\1True/g" dist/packages-dist-ivy-aot/bazel/src/ng_module.bzl +# The components repository updated to rules_nodejs#0.38.0 before Angular Bazel did. To do this, +# the `@angular/bazel` v0.38.0 compatibility changes were patched on postinstall. This now +# conflicts because we install a `@angular/bazel` version that already includes these compatibility +# changes. This would result in the patch being a noop for which the `patch` command throws. +# To work around this temporarily, we just ensure that the patch does not run on postinstall. +# TODO: remove this once Angular components no longer needs the postinstall patch. +sed -i -r "s/shelljs.cat.+angular_bazel_0\.38\.0\.patch.+;//g" ${MATERIAL_REPO_TMP_DIR}/tools/bazel/postinstall-patches.js + # Switch into Material directory. cd ${MATERIAL_REPO_TMP_DIR}