-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
48 lines (35 loc) · 1.07 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
GOOS := "linux"
mod:
@go mod tidy
fetch-secrets-amd64:
GOOS=$(GOOS) GOARCH=amd64 go build \
-o extensions/fetch-secrets \
cmd/fetch-secrets/main.go
load-secrets-amd64:
GOOS=$(GOOS) GOARCH=amd64 go build \
-o extensions/wrapper/load-secrets \
cmd/load-secrets/main.go
build-amd64: clean mod fetch-secrets-amd64 load-secrets-amd64
zip-amd64: build-amd64
zip -r aws-lambda-secrets-amd64.zip extensions/
@echo "Extension amd64 zip archive created"
fetch-secrets-arm64:
GOOS=$(GOOS) GOARCH=arm64 go build \
-o extensions/fetch-secrets \
cmd/fetch-secrets/main.go
load-secrets-arm64:
GOOS=$(GOOS) GOARCH=arm64 go build \
-o extensions/wrapper/load-secrets \
cmd/load-secrets/main.go
build-arm64: clean mod fetch-secrets-arm64 load-secrets-arm64
zip-arm64: build-arm64
zip -r aws-lambda-secrets-arm64.zip extensions/
@echo "Extension arm64 zip archive created"
release: zip-amd64 zip-arm64 clean
ec2-secrets-amd64:
GOOS=$(GOOS) GOARCH=amd64 go build \
-o ec2/ec2-secrets \
cmd/ec2-secrets/main.go
clean:
-rm -rf extensions ec2
.PHONY: build zip clean mod