File tree Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Expand file tree Collapse file tree 1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change 1+ SHELL := /bin/bash
2+ LAMBDA_DIR := lambda
3+ DEPS_CONTAINER := alpine:3.11
4+
5+ -include $(shell curl -sSL -o .build-harness "https ://cloudposse.tools/build-harness"; echo .build-harness)
6+
7+ readme/build :
8+ @atmos docs generate readme
9+
10+ readme :
11+ @atmos docs generate readme
12+
13+ define docker
14+ docker run -i -v $(PWD ) /$(LAMBDA_DIR ) /:/code -w /code $(DEPS_CONTAINER ) /bin/sh -c '$(1 ) '
15+ endef
16+
17+ # # Install dependencies
18+ dependencies :
19+ @echo " ==> Installing Lambda function dependencies..."
20+ @$(call docker, apk add --update py-pip && \
21+ pip install virtualenv && \
22+ virtualenv venv --always-copy && \
23+ source ./venv/bin/activate && \
24+ ./venv/bin/pip install -qUr requirements.txt)
25+
26+ # # Build Lambda function zip
27+ build : dependencies
28+ @echo " ==> Building Lambda function zip..."
29+ @mkdir -p artifacts
30+ @cd $(LAMBDA_DIR ) && zip -r ../artifacts/lambda.zip *
31+ @ls -l artifacts/lambda.zip
You can’t perform that action at this time.
0 commit comments