#!/usr/bin/env bash set -eux -o pipefail function testBazel() { # Set up bazel version rm -rf demo # Create project ng new demo --collection=@angular/bazel --defaults --skip-git --style=scss node replace_angular_repo.js "./demo/WORKSPACE" cd demo # TODO(kyliau) pin @angular/bazel version to 7.2.2 due to builder bug in 7.2.3 yarn add @angular/bazel@7.2.2 cp ../package.json.replace ./package.json ng generate component widget --style=css ng build ng test ng e2e } function testNonBazel() { # Replace angular.json that uses Bazel builder with the default generated by CLI cp ../angular.json.original ./angular.json rm -rf dist src/main.dev.ts src/main.prod.ts ng build --progress=false ng test --progress=false --watch=false ng e2e --configuration=ci } testBazel testNonBazel