From f96a06bb3fd8b6d199e9a0cf2019772bf5d9b85f Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Fri, 24 May 2019 10:18:05 -0700 Subject: [PATCH] Cleanup examples_angular now that it uses managed directories --- scripts/setup_examples_angular.sh | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/scripts/setup_examples_angular.sh b/scripts/setup_examples_angular.sh index afcb1baeeb..d6e310f3cd 100755 --- a/scripts/setup_examples_angular.sh +++ b/scripts/setup_examples_angular.sh @@ -34,7 +34,7 @@ printf "\n\nSetting up /examples/angular\n" # Replace @bazel/foobar packages in package.json with file paths to locally generated packages for package in ${PACKAGES[@]} ; do - echo_and_run sedi "s#\"@bazel\/${package}\":[[:blank:]]*\"[_\-\.a-zA-Z0-9]*\"#\"@bazel\/${package}\": \"file://${RULES_NODEJS_DIR}/dist/npm_bazel_${package}\"#" package.json + echo_and_run sedi "s#\"@bazel\/${package}\":[[:blank:]]*\"[~_\-\.a-zA-Z0-9]*\"#\"@bazel\/${package}\": \"file://${RULES_NODEJS_DIR}/dist/npm_bazel_${package}\"#" package.json done # We can't do multi-line replacements with sed so we'll keep the http_archive @@ -43,15 +43,6 @@ printf "\n\nSetting up /examples/angular\n" echo_and_run sedi "s#urls* = \[*\"https:\/\/github\.com\/[a-zA-Z_]*\/rules_nodejs[^\"]*\"\]*#url = \"file://${RULES_NODEJS_DIR}/dist/build_bazel_rules_nodejs/release.tar.gz\"#" WORKSPACE echo_and_run sedi "s#sha256 =#\# sha256 =#" WORKSPACE - # TEMPORARY for managed_directories - echo_and_run sedi "s#name \= \"angular_bazel_example\"#name = \"angular_bazel_example\", managed_directories = {\"@npm\": [\"node_modules\"]}#" WORKSPACE - echo_and_run sedi "s#\"\@bazel\/bazel\"\: \"0\.25\.1\"#\"@bazel/bazel\": \"file:../../node_modules/@bazel/bazel\"#" package.json - echo "" >> .bazelrc - echo "##################################################" >> .bazelrc - echo "# Turn on managed_directories" >> .bazelrc - echo "build --experimental_allow_incremental_repository_updates" >> .bazelrc - echo "query --experimental_allow_incremental_repository_updates" >> .bazelrc - # Check that above replacements worked if ! grep -q "dist/npm_bazel_" package.json; then echo "package.json replacements failed!"