-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
20 lines (16 loc) · 926 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
GOMOD=$(shell test -f "go.work" && echo "readonly" || echo "vendor")
LDFLAGS=-s -w
cli:
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/import-feature cmd/import-feature/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/refresh-features cmd/refresh-features/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/ensure-properties cmd/ensure-properties/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/merge-properties cmd/merge-properties/main.go
go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -o bin/ensure-features cmd/ensure-features/main.go
lambda:
@make lambda-import
lambda-import:
if test -f bootstrap; then rm -f bootstrap; fi
if test -f import-feature.zip; then rm -f import-feature.zip; fi
GOARCH=arm64 GOOS=linux go build -mod $(GOMOD) -ldflags="$(LDFLAGS)" -tags lambda.norpc -o bootstrap cmd/import-feature/main.go
zip import-feature.zip bootstrap
rm -f bootstrap