blob: b6ea278bc1acdac3a9d57d916bdac3b7d213f86d [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
13rm -f package-lock.json
14
Steven Burrowsa145e102017-06-16 13:37:50 -040015# Install Project Dependencies
16echo "Installing project dependencies"
17npm install --loglevel=error
Steven Burrows0f26ac82017-08-07 22:36:36 +010018rm -f package-lock.json
Steven Burrowsa145e102017-06-16 13:37:50 -040019
20# Build the GUI Project
21echo "Packaging JavaScript and CSS"
Yuta HIGUCHIcb97b312017-08-30 10:10:34 -070022npm run build