-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (25 loc) · 977 Bytes
/
Makefile
File metadata and controls
34 lines (25 loc) · 977 Bytes
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
.PHONY: clean build rmlambda deploy default createrole createsns
include config.mk
initnodedeps:
npm install --prefix . https fs adm-zip async aws-sdk mime follow-redirects
clean :
rm -rf *.zip
build :
7za a runhugo.zip * -x!Makefile -x!*.mk -x!sample.*
rmlambda:
aws lambda delete-function --function-name ${FUNC_NAME}
deploy :
aws lambda create-function --function-name ${FUNC_NAME} \
--runtime ${RUNTIME} \
--role ${ROLE} \
--memory-size ${MEMORY} \
--handler ${HANDLER} \
--zip-file ${CODE_ZIP} \
--timeout ${TIMEOUT}
createsns:
aws sns create-topic --name GithubWebhookEvent
createrole:
aws iam create-role --role-name ${ROLE} --assume-role-policy-document file://policy.json
aws iam put-role-policy --role-name ${ROLE} --policy-name AWSLambdaBasicExecutionRole --policy-document file://rolepolicy.json
aws iam put-role-policy --role-name ${ROLE} --policy-name AccessToHugoS3Buckets --policy-document file://rolepolicyS3.json
default : build