-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathMakefile
32 lines (23 loc) · 882 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
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
ldflags = -X github.com/neutron-org/neutron-query-relayer/internal/app.Version=$(VERSION) \
-X github.com/neutron-org/neutron-query-relayer/internal/app.Commit=$(COMMIT)
dev: clean
go run ./cmd/neutron_query_relayer/ start
clean:
@echo "Removing relayer storage state"
-@rm -rf ./storage
test:
go test ./...
.PHONY: build
build:
go build -ldflags '$(ldflags)' -a -o build/neutron_query_relayer ./cmd/neutron_query_relayer/*.go
build-docker:
docker build --build-arg LDFLAGS='$(ldflags)' . -t neutron-org/neutron-query-relayer
generate-openapi:
@cd ./internal/subscriber/querier ; swagger generate client -f openapi.yml
install:
go install -ldflags '$(ldflags)' -a ./cmd/neutron_query_relayer
mocks:
@echo "Regenerate mocks..."
go generate ./...