-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
42 lines (33 loc) · 898 Bytes
/
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
VERSION := $(shell git describe --tags)
AWS_SDK_GO_V2_DIR ?= ../../aws/aws-sdk-go-v2
.PHONY: clean test gen
build: gen awslim
awslim: go.* *.go
CGO_ENABLED=0 \
GOOS=${AWSLIM_OS} \
GOARCH=${AWSLIM_ARCH} \
go build -o $@ \
-tags netgo \
-ldflags '-s -w -extldflags "-static" -X github.com/fujiwara/awslim.Version=$(VERSION)' \
cmd/awslim/main.go
clean:
rm -rf *_gen.go awslim dist/ cmd/awslim-gen/gen.go
go mod tidy
gen:
go generate ./cmd/awslim-gen .
go fmt
test:
go test -v .
packages:
goreleaser build --skip=validate --clean
docker-build-and-push: Dockerfile
docker buildx build \
--platform=linux/amd64,linux/arm64 \
-t ghcr.io/fujiwara/awslim:builder \
-f Dockerfile \
--push \
.
.PHONY: all-services.yaml
all-services.yaml:
echo "services:" > all-services.yaml
ls $(AWS_SDK_GO_V2_DIR)/service/ | awk '!/^internal$$/{print " " $$1 ":"}' >> all-services.yaml