forked from cdklabs/aws-delivlib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-custom-resource-handlers.sh
30 lines (28 loc) · 1.16 KB
/
build-custom-resource-handlers.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
#!/bin/bash
set -euo pipefail
compile="tsc --alwaysStrict
--inlineSourceMap
--lib ES2017
--module CommonJS
--moduleResolution Node
--noFallthroughCasesInSwitch
--noImplicitAny
--noImplicitReturns
--noImplicitThis
--noUnusedLocals
--noUnusedParameters
--removeComments
--strict
--target ES2017
--types node"
for handler in pgp-secret private-key certificate-signing-request
do
echo "Building CustomResource handler ${handler}"
${compile} \
--incremental \
--tsBuildInfoFile "./custom-resource-handlers/src/${handler}.tsbuildinfo" \
--outDir "./custom-resource-handlers/bin/${handler}" \
"./custom-resource-handlers/src/${handler}.ts" \
./custom-resource-handlers/src/_*.ts
cp "./custom-resource-handlers/bin/${handler}/${handler}.js" "./custom-resource-handlers/bin/${handler}/index.js"
done