build: fix build scripts on macOS (#33854)
In #33823, `scripts/package-builds.sh` (which is used by both `build-packages-dist.sh` and `build-ivy-npm-packages.sh`) was updated to use `realpath`. It turns out that `realpath` does not exist on macOS, so the build scripts do not work there. In order to fix this (and also reduce the likelihood of introducing similar issues in the future), this commit changes these bash scripts to Node.js scripts (using [ShellJS](https://github.com/shelljs/shelljs) for a cross-platform implementation of Unix shell commands where necessary). PR Close #33854
This commit is contained in:

committed by
Alex Rickabaugh

parent
e641eaaae0
commit
5bfcd8231a
@ -4,7 +4,7 @@ Currently all changes to Ivy are validated against the test suite of the
|
||||
`angular/components` repository. In order to debug the `material-unit-tests` CI
|
||||
job, the following steps can be used:
|
||||
|
||||
1\) Build the Ivy package output by running `./scripts/build-ivy-npm-packages.sh` in
|
||||
1\) Build the Ivy package output by running `node ./scripts/build-ivy-npm-packages.js` in
|
||||
the `angular/angular` repo.
|
||||
|
||||
2\) Clone the `angular/components` repository if not done yet ([quick link to repo](https://github.com/angular/components)).
|
||||
@ -32,9 +32,9 @@ selecting a given test target.
|
||||
|
||||
Here is an example of commands that run individual test targets. Note that it is
|
||||
**important** to specify the `--define=compile=aot` flag in order to run tests with Ivy.
|
||||
|
||||
|
||||
```bash
|
||||
yarn bazel test --define=compile=aot src/material/slider:unit_tests
|
||||
yarn bazel test --define=compile=aot src/cdk/a11y:unit_tests
|
||||
yarn bazel test --define=compile=aot src/material/toolbar:unit_tests
|
||||
```
|
||||
```
|
||||
|
@ -69,7 +69,7 @@ yarn install
|
||||
To build Angular run:
|
||||
|
||||
```shell
|
||||
./scripts/build-packages-dist.sh
|
||||
node ./scripts/build-packages-dist.js
|
||||
```
|
||||
|
||||
* Results are put in the `dist/packages-dist` folder.
|
||||
@ -190,7 +190,7 @@ c. Some package managers (such as `pnpm` or `yarn pnp`) might not work correctly
|
||||
### Publishing to GitHub repos
|
||||
You can also manually publish `*-builds` snapshots just like our CircleCI build does for upstream
|
||||
builds. Before being able to publish the packages, you need to build them locally by running the
|
||||
`./scripts/build-packages-dist.sh` script.
|
||||
`./scripts/build-packages-dist.js` script.
|
||||
|
||||
First time, you need to create the GitHub repositories:
|
||||
|
||||
|
Reference in New Issue
Block a user