-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
32 lines (23 loc) · 765 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
GIT_VER := $(shell git describe --tags)
DATE := $(shell date +%Y-%m-%dT%H:%M:%S%z)
export GO111MODULE := on
.PHONY: test test-localstack install clean image release-image
cmd/rin/rin: *.go cmd/rin/main.go
cd cmd/rin && go build -ldflags "-s -w -X main.version=${GIT_VER} -X main.buildDate=${DATE}"
install: cmd/rin/rin
install cmd/rin/rin ${GOPATH}/bin
test-localstack:
docker-compose up -d
TEST_LOCALSTACK=on dockerize -timeout 30s -wait tcp://localhost:4566 go test -v -run Local ./...
test:
go test -v ./...
dist/:
goreleaser build --snapshot --rm-dist
clean:
rm -rf cmd/rin/rin pkg/* test/ls_tmp/* dist/
image: dist/
docker build \
--tag ghcr.io/fujiwara/rin:$(GIT_VER) \
.
release-image: image
docker push ghcr.io/fujiwara/rin:$(GIT_VER)