Skip to content

Commit 1475b62

Browse files
committed
build: cronjob cannot install angular snapshot builds
Apparently the script that also ran on TravisCI does not work on MacOS, nor on CircleCI because it's not guaranteed that the default awk supports storing match() results in an array that can print individual match groups.
1 parent 3982e9e commit 1475b62

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scripts/install-angular-snapshots.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,9 @@ set -e
88
# Go to the project root directory
99
cd $(dirname $0)/../
1010

11-
yarn add \
12-
$(awk 'match($0, "@angular/(.*)\":", m){print "github:angular/"m[1]"-builds"}' package.json)
11+
# Searches for all Angular dependencies in the "package.json" and computes the URL to the github
12+
# snapshot builds for each Angular package. Afterwards it runs `yarn add --force {urls}` in order
13+
# to install the snapshot builds for each package. Note that we need to use `--force` because
14+
# otherwise Yarn will error due to already specified dependencies.
15+
egrep -o '@angular/[^"]+' ./package.json | sed 's/@/github:/' | sed 's/.*/&-builds/' |
16+
xargs yarn add --force

0 commit comments

Comments
 (0)