Skip to content

Commit 78ada98

Browse files
devversionalxhub
authored andcommitted
ci: avoid postinstall error when building material-unit-tests job (angular#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 angular#32889
1 parent 3830f6f commit 78ada98

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

scripts/ci/run_angular_material_unit_tests.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@ angular_dir=$(pwd)
1414
sed -i'.bak' "s/\(_ENABLE_NG_TYPE_CHECKING = \)True/\1False/g" ${MATERIAL_REPO_TMP_DIR}/tools/defaults.bzl
1515
sed -i'.bak' "s/\(\"ivyTemplateTypeCheck\": \)False/\1True/g" dist/packages-dist-ivy-aot/bazel/src/ng_module.bzl
1616

17+
# The components repository updated to rules_nodejs#0.38.0 before Angular Bazel did. To do this,
18+
# the `@angular/bazel` v0.38.0 compatibility changes were patched on postinstall. This now
19+
# conflicts because we install a `@angular/bazel` version that already includes these compatibility
20+
# changes. This would result in the patch being a noop for which the `patch` command throws.
21+
# To work around this temporarily, we just ensure that the patch does not run on postinstall.
22+
# TODO: remove this once Angular components no longer needs the postinstall patch.
23+
sed -i -r "s/shelljs.cat.+angular_bazel_0\.38\.0\.patch.+;//g" ${MATERIAL_REPO_TMP_DIR}/tools/bazel/postinstall-patches.js
24+
1725
# Switch into Material directory.
1826
cd ${MATERIAL_REPO_TMP_DIR}
1927

0 commit comments

Comments
 (0)