-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·49 lines (38 loc) · 1.18 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
# Fail on any error.
set -e
# Display commands being run.
set -x
fancyPrint () {
if [ $# == 1 ]
then
RED="\033[1;31m"
NC="\033[0m"
echo -e "\n${RED}+++++++++++++++++++++++++++++++"
echo -e "${RED}----- $1"
echo -e "${RED}+++++++++++++++++++++++++++++++${NC}\n"
fi
}
{ fancyPrint "Starting build script for public OMSDK components"; } 2>/dev/null
{ fancyPrint "node and npm versions"; } 2>/dev/null
# Print node and npm versions
node -v
npm -v
# Install dependencies
{ fancyPrint "Installing npm dependencies"; } 2>/dev/null
npm install
# List actual package versions installed
{ fancyPrint "Listing installed npm packages"; } 2>/dev/null
npm list
# Run linter checks
{ fancyPrint "Running linter checks"; } 2>/dev/null
npm run lint
# Run tests
{ fancyPrint "Running unit tests for public OMSDK components"; } 2>/dev/null
npm run test
{ fancyPrint "Ensuring that documentation can be generated"; } 2>/dev/null
npm run jsdoc
# Run the build to produce final deliverables
{ fancyPrint "Building and packaging final deliverables for public OMSDK components"; } 2>/dev/null
npm run build
{ fancyPrint "Finished build script for public OMSDK components"; } 2>/dev/null