forked from aws-solutions/performance-dashboard-on-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·49 lines (41 loc) · 781 Bytes
/
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
#!/bin/bash
set -e
# Set workspace paths
WORKSPACE=$(pwd)
CDK_DIR=$WORKSPACE/cdk
FRONTEND_DIR=$WORKSPACE/frontend
BACKEND_DIR=$WORKSPACE/backend
EXAMPLES_DIR=$WORKSPACE/examples
verify_prereqs() {
# Verify necessary commands
echo "node version"
node --version
echo "npm version"
npm --version
echo "cdk version"
cdk --version
}
build_backend() {
echo "Building backend application"
cd $BACKEND_DIR
npm run build
}
build_frontend() {
echo "Building frontend application"
cd $FRONTEND_DIR
npm run build
}
build_examples() {
echo "Packaging examples stack"
cd $EXAMPLES_DIR
npm run build
}
build_cdk() {
cd $CDK_DIR
npm run build
}
# Start execution
build_cdk
build_backend
build_frontend
build_examples