-
Notifications
You must be signed in to change notification settings - Fork 75
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (26 loc) · 761 Bytes
/
Makefile
File metadata and controls
32 lines (26 loc) · 761 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
DOCKER ?= docker
INPUT_RELEASE_VERSION ?= 0.4.0
RUST_VERSION ?= 1.55.0
REPO ?= rustserverless/lambda-rust
TAG ?= latest
publish: build
$(DOCKER) push $(REPO):${TAG}
publish-tag: build publish
$(DOCKER) tag $(REPO):${TAG} "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)"
$(DOCKER) push "$(REPO):$(INPUT_RELEASE_VERSION)-rust-$(RUST_VERSION)"
build:
$(DOCKER) build --build-arg RUST_VERSION=$(RUST_VERSION) -t $(REPO):${TAG} .
test:
@tests/test.sh
debug: build
$(DOCKER) run --rm -it \
-u $(id -u):$(id -g) \
-v ${PWD}:/code:Z \
-v ${HOME}/.cargo/registry:/cargo/registry \
-v ${HOME}/.cargo/git:/cargo/git \
--entrypoint=/bin/bash \
$(REPO):$(TAG)
check:
$(DOCKER) run --rm \
--entrypoint=/usr/local/bin/latest.sh \
$(REPO)