-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathMakefile
31 lines (23 loc) · 858 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
PACKAGE_NAME := github.com/NibiruChain/pricefeeder
GOLANG_CROSS_VERSION ?= v1.19.4
VERSION ?= $(shell git describe --tags --abbrev=0)
COMMIT ?= $(shell git rev-parse HEAD)
BUILD_TARGETS := build install
generate:
go generate ./...
build-docker:
docker-compose build
docker-compose:
docker-compose up
test:
go test ./...
run:
go run ./main.go
run-debug:
go run ./main.go -debug true
###############################################################################
### Build ###
###############################################################################
.PHONY: build install
$(BUILD_TARGETS):
CGO_ENABLED=0 go $@ -mod=readonly -ldflags="-s -w -X github.com/NibiruChain/pricefeeder/cmd.Version=$(VERSION) -X github.com/NibiruChain/pricefeeder/cmd.CommitHash=$(COMMIT)" .