-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
34 lines (25 loc) · 1.21 KB
/
Makefile
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
TEST?=$$(go list ./... | grep -v 'vendor')
SHELL := /bin/bash
GOOS=linux
GOARCH=arm64
VERSION=test
# List of targets the `readme` target should call before generating the readme
export README_DEPS ?= docs/targets.md
-include $(shell curl -sSL -o .build-harness "https://cloudposse.tools/build-harness"; echo .build-harness)
## Lint terraform code
lint:
$(SELF) terraform/install terraform/get-modules terraform/get-plugins terraform/lint terraform/validate
build-all: build-listener build-orchestrator
build-listener:
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -v -o build/listener/bootstrap -tags lambda.norpc ./cmd/listener
cd build/listener/ && zip listener-lambda.zip bootstrap
build-orchestrator:
GOOS=${GOOS} GOARCH=${GOARCH} CGO_ENABLED=0 go build -v -o build/orchestrator/bootstrap -tags lambda.norpc ./cmd/orchestrator
cd build/orchestrator/ && zip orchestrator-lambda.zip bootstrap
deps:
go get github.com/aws/aws-lambda-go/lambda
go mod download
# Run acceptance tests
test: deps
go run gotest.tools/gotestsum@latest --junitfile unit-tests.xml --format pkgname-and-test-fails -- -timeout 30m -tags=acceptance -parallel=1 -count=1 -v $(TEST)
.PHONY: lint build-listener build-all deps version testacc