File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ .PHONY : clean configtest
2+
3+ lambda :
4+ npm install .
5+ @echo " Factory package files..."
6+ @if [ ! -d build ] ; then mkdir build; fi
7+ @cp index.js build/index.js
8+ @cp config.json build/config.json
9+ @if [ -d build/node_modules ] ; then rm -rf build/node_modules; fi
10+ @cp -R node_modules build/node_modules
11+ @cp -R lib build/
12+ @cp -R bin build/
13+ @rm -rf build/bin/darwin
14+ @echo " Create package archive..."
15+ @cd build && zip -rq aws-lambda-image.zip .
16+ @mv build/aws-lambda-image.zip ./
17+
18+ uploadlambda : lambda
19+ @if [ -z " ${LAMBDA_FUNCTION_NAME} " ]; then (echo " Please export LAMBDA_FUNCTION_NAME" && exit 1); fi
20+ aws lambda update-function-code --function-name ${LAMBDA_FUNCTION_NAME} --zip-file fileb://aws-lambda-image.zip
21+
22+ configtest :
23+ @./bin/configtest
24+
25+ clean :
26+ @echo " clean up package files"
27+ @if [ -f aws-lambda-image.zip ]; then rm aws-lambda-image.zip; fi
28+ @rm -rf build/*
You can’t perform that action at this time.
0 commit comments