-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathMakefile.ses
More file actions
24 lines (20 loc) · 658 Bytes
/
Makefile.ses
File metadata and controls
24 lines (20 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ifndef CI
BUILD ?= docker run -it -v $(shell pwd)/lambda/:/code -w /code --entrypoint=npm node:10-alpine update --unsafe-perm=true --allow-root
else
BUILD ?= cd lambda/ && npm update && cd ..
endif
# Ensures that a variable is defined
define assert-set
@[ -n "$($1)" ] || (echo "$(1) not defined in $(@)"; exit 1)
endef
## Build lambda package
build:
$(BUILD)
sudo chmod -R 777 lambda
mkdir -p artifacts
cd lambda && zip -r ../artifacts/lambda.zip *
## Verify $EMAIL used as gateway for forwarding
verify-gateway-email:
$(call assert-set,REGION)
$(call assert-set,EMAIL)
aws --region=$(REGION) ses verify-email-identity --email-address $(EMAIL)