blob: 36f798513ac9acb5834e88a1a14d331565cd4d98 [file] [log] [blame]
Michael Lando451a3402017-02-19 10:28:42 +02001#!/bin/sh
2
Michael Landoed64b5e2017-06-09 03:19:04 +03003
4
Michael Lando451a3402017-02-19 10:28:42 +02005### Set the node environment.
Michael Landoed64b5e2017-06-09 03:19:04 +03006NODE_VERSION="v6.10.0"
Michael Lando451a3402017-02-19 10:28:42 +02007
8
9
Michael Landoed64b5e2017-06-09 03:19:04 +030010### Set the NVM root dir
11NVM_DIR=/home/${USER}/.nvm
Michael Lando451a3402017-02-19 10:28:42 +020012
13
14
Michael Landoed64b5e2017-06-09 03:19:04 +030015echo "Set the node environment."
16. "${NVM_DIR}/nvm.sh"
Michael Lando451a3402017-02-19 10:28:42 +020017echo "OK."
18echo ""
19
20
21
Michael Landoed64b5e2017-06-09 03:19:04 +030022### Add newer c++ compiler.
23if [ -f /opt/rh/devtoolset-4/enable ]; then
24 . /opt/rh/devtoolset-4/enable
25fi
26
27
28
29### Set the node version manager version.
30echo "Set the node version manager version."
31nvm use ${NODE_VERSION}
32echo "OK."
33echo ""
34
35
36
37### Run the Node package manager (NPM).
38echo "Run the Node package manager (NPM)."
39npm install
Michael Lando451a3402017-02-19 10:28:42 +020040echo "OK."
41echo ""
42
43
44
45### Build the application.
46echo "Build the application."
Michael Landoed64b5e2017-06-09 03:19:04 +030047npm run build:prod
48echo "OK."
49echo ""
Michael Lando451a3402017-02-19 10:28:42 +020050