Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 1 | #!/bin/bash |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 2 | set -e |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 3 | |
| 4 | ONOS_INSTALL_LOCATION=$2 |
| 5 | echo ${ONOS_INSTALL_LOCATION} |
| 6 | |
Steven Burrows | 1c2a968 | 2017-07-14 16:52:46 +0100 | [diff] [blame] | 7 | export NODEJS_HOME=${ONOS_INSTALL_LOCATION} |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 8 | export PATH=$NODEJS_HOME/bin:$PATH |
| 9 | |
| 10 | cd $ONOS_ROOT/tools/gui |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 11 | |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 12 | # Ensure lock file is removed |
| 13 | rm -f package-lock.json |
| 14 | |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 15 | # Install Project Dependencies |
| 16 | echo "Installing project dependencies" |
| 17 | npm install --loglevel=error |
Steven Burrows | 0f26ac8 | 2017-08-07 22:36:36 +0100 | [diff] [blame] | 18 | rm -f package-lock.json |
Steven Burrows | a145e10 | 2017-06-16 13:37:50 -0400 | [diff] [blame] | 19 | |
| 20 | # Build the GUI Project |
| 21 | echo "Packaging JavaScript and CSS" |
Yuta HIGUCHI | cb97b31 | 2017-08-30 10:10:34 -0700 | [diff] [blame] | 22 | npm run build |