-
Notifications
You must be signed in to change notification settings - Fork 484
/
Copy pathrelease.sh
executable file
·49 lines (45 loc) · 1.52 KB
/
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
47
48
#! /bin/bash
timestamp=$(date +%s)
unamestr=$(uname)
export VERSION=v$(node -p "require('../package.json').version")
echo version is "$VERSION"
case $unamestr in
"Darwin" | "FreeBSD")
sed -i '' -e "s/(v.*)/($VERSION)/g" \
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
-e "s/src-.*zip/src-$VERSION.zip/g" \
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
../templates/master.yaml;;
"Linux")
sed -i -e "s/(v.*)/($VERSION)/g" \
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
-e "s/src-.*zip/src-$VERSION.zip/g" \
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
-e "s/qbusiness-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
../templates/master.yaml;;
*)
sed -i -e "s/(v.*)/($VERSION)/g" \
-e "s/Timestamp:.*/Timestamp: $timestamp/g" \
-e "s/src-.*zip/src-$VERSION.zip/g" \
-e "s/initiate-chat-lambda-.*zip/initiate-chat-lambda-$VERSION.zip/g" \
-e "s/streaming-lambda-.*zip/streaming-lambda-$VERSION.zip/g" \
-e "s/custom-resources-.*zip/custom-resources-$VERSION.zip/g" \
-e "s/qbusiness-lambda-.*zip/qbusiness-lambda-$VERSION.zip/g" \
../templates/master.yaml;;
esac
cd ../lex-web-ui
npm run build
npm run build-dist
cd ..
make
cd build
make "custom-resources-$VERSION.zip"
make "initiate-chat-lambda-$VERSION.zip"
make "streaming-lambda-$VERSION.zip"
make "qbusiness-lambda-$VERSION.zip"
cd ..
cd dist
make