-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
19 lines (15 loc) · 850 Bytes
/
Makefile
File metadata and controls
19 lines (15 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
GOMOD=$(shell test -f "go.work" && echo "readonly" || echo "vendor")
LDFLAGS=-s -w
cli:
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/add-reminder cmd/add-reminder/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/remove-reminders cmd/remove-reminders/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/list-reminders cmd/list-reminders/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/process-reminders cmd/process-reminders/main.go
lambda:
@make lambda-process-reminders
lambda-process-reminders:
if test -f bootstrap; then rm -f bootstrap; fi
if test -f process-reminders.zip; then rm -f process-reminders.zip; fi
GOARCH=arm64 GOOS=linux go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -tags lambda.norpc -o bootstrap cmd/process-reminders/main.go
zip process-reminders.zip bootstrap
rm -f bootstrap