forked from aws-solutions/performance-dashboard-on-aws
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrelease.sh
executable file
·46 lines (38 loc) · 993 Bytes
/
release.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
#!/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
# Validate release version from input
newVersion=$1
if [ "$newVersion" != "" ]; then
echo "==================================="
echo "Releasing new version = $newVersion"
echo "==================================="
else
echo "Please specify the new version in semver format like v1.0.3"
exit 0
fi
verify_prereqs() {
echo "npm version"
npm --version
}
update_package_jsons() {
cd $CDK_DIR
echo "Updating package.json in cdk"
npm version $newVersion
cd $FRONTEND_DIR
echo "Updating package.json in frontend"
npm version $newVersion
cd $BACKEND_DIR
echo "Updating package.json in backend"
npm version $newVersion
cd $EXAMPLES_DIR
echo "Updating package.json in backend"
npm version $newVersion
}
verify_prereqs
update_package_jsons