Skip to content

Commit 74f6b75

Browse files
authored
Clean up Makefile by removing unused targets
Removed README_DEPS and lint target from Makefile.
1 parent d4124b0 commit 74f6b75

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Makefile

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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

0 commit comments

Comments
 (0)