-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
50 lines (41 loc) · 1.27 KB
/
justfile
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
50
set dotenv-load := true
AWS_REGION := "eu-south-1"
alias f := format
alias s := scan-local
alias t := test
requirements:
@mkdir -p /opt/nodejs
@find "$(pwd -P)/common/nodejs" -name "*.js" -maxdepth 1 -exec ln -s "{}" /opt/nodejs ';'
@npm install --prefix common/nodejs
@npm install --prefix scan
@npm install --prefix book
test: requirements
@cd scan && npm test
@cd book && npm test
@cd common/nodejs && npm test
scan-local: requirements
cd scan && npm run run-local
format:
npx prettier . --write
deploy-common-layer:
cd ./common && zip -r lambda_layer.zip .
aws lambda publish-layer-version \
--no-cli-pager \
--region {{AWS_REGION}} \
--layer-name GymBookingAssistantCommonLayer \
--compatible-runtimes nodejs20.x \
--zip-file fileb://common/lambda_layer.zip \
deploy-scan-function:
cd ./scan && zip -r scan.zip .
aws lambda update-function-code \
--no-cli-pager \
--region {{AWS_REGION}} \
--function-name GymBookingAssistant_Scan \
--zip-file fileb://scan/scan.zip
deploy-book-function:
cd ./book && zip -r book.zip .
aws lambda update-function-code \
--no-cli-pager \
--region {{AWS_REGION}} \
--function-name GymBookingAssistant_Book \
--zip-file fileb://book/book.zip