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:
George Kalpakas
2019-11-15 02:56:55 +02:00
committed by Alex Rickabaugh
parent c89eed56b6
commit 7eb3e3bce6
19 changed files with 203 additions and 134 deletions

View File

@ -0,0 +1,8 @@
#!/usr/bin/env node
'use strict';
const {buildTargetPackages} = require('./package-builder');
// Build the ivy packages.
buildTargetPackages('dist/packages-dist-ivy-aot', 'aot', 'Ivy AOT');