blob: 0b438152829687aeb5845641477477c361d3ab8e [file] [log] [blame]
Steven Burrowsa145e102017-06-16 13:37:50 -04001#!/bin/bash
Steven Burrows0f26ac82017-08-07 22:36:36 +01002set -e
Steven Burrowsa145e102017-06-16 13:37:50 -04003
4ONOS_INSTALL_LOCATION=$2
5echo ${ONOS_INSTALL_LOCATION}
6
Steven Burrows1c2a9682017-07-14 16:52:46 +01007export NODEJS_HOME=${ONOS_INSTALL_LOCATION}
Steven Burrowsa145e102017-06-16 13:37:50 -04008export PATH=$NODEJS_HOME/bin:$PATH
9
10cd $ONOS_ROOT/tools/gui
Steven Burrowsa145e102017-06-16 13:37:50 -040011
Steven Burrows0f26ac82017-08-07 22:36:36 +010012# Ensure lock file is removed
Yuta HIGUCHIcb97b312017-08-30 10:10:34 -070013rm -rf node_modules
Steven Burrows0f26ac82017-08-07 22:36:36 +010014rm -f package-lock.json
15
Steven Burrowsa145e102017-06-16 13:37:50 -040016# Install Project Dependencies
17echo "Installing project dependencies"
18npm install --loglevel=error
Steven Burrows0f26ac82017-08-07 22:36:36 +010019rm -f package-lock.json
Steven Burrowsa145e102017-06-16 13:37:50 -040020
21# Build the GUI Project
22echo "Packaging JavaScript and CSS"
Yuta HIGUCHIcb97b312017-08-30 10:10:34 -070023npm run build