From 676d3af61e4dd73e84dd26b186a9d3df9f7aefac Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Mon, 5 Aug 2019 17:58:41 -0400 Subject: [PATCH] LP1830973 Angular reversioning script Script for rebuilding the dependencies for the Angular app. This is useful both for major Angular upgrades or just for simply refreshing the deps on the current version to ensure everything is up to date, but not so up to date is breaks Angular compatibility. Signed-off-by: Bill Erickson Signed-off-by: Galen Charlton Signed-off-by: Chris Sharp --- Open-ILS/src/eg2/reversion.sh | 68 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100755 Open-ILS/src/eg2/reversion.sh diff --git a/Open-ILS/src/eg2/reversion.sh b/Open-ILS/src/eg2/reversion.sh new file mode 100755 index 0000000000..68cbe15f89 --- /dev/null +++ b/Open-ILS/src/eg2/reversion.sh @@ -0,0 +1,68 @@ +#!/bin/bash +# Author: Bill Erickson +# +# Script to rebuild the set of Angular dependencies. +# 1. Remove node_modules +# 2. Remove dependencies and devDependencies from package.json +# 3. Install @angular/core using the requested version of angular. +# 4. Reinstall dependencies and devDependencies +# +# Building in this fashion, where we start with a single Angular package +# allows the other packages to better determine the version to use. +# +# Script requires 'jq' program (sudo apt-get install jq) for +# parsing and manipulating JSON. +# ---------------------------------------------------------------------------- +set -euo pipefail +ANGULAR_VERSION="" # Example ^8.0.0 + +function usage { + cat < package.wip.json +mv package.wip.json package.json + +# Start by installing the version of Angular we want to use +npm install @angular/cli@$ANGULAR_VERSION @angular/core@$ANGULAR_VERSION + +# Then let NPM figure out the versioning for the rest. + +npm install --save $DEPS +npm install --save-dev $DEV_DEPS + + -- 2.11.0