-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
33 lines (25 loc) · 1.01 KB
/
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
PACKAGES=$(shell go list ./... | grep -v '/simulation')
VERSION := $(shell echo $(shell git describe --tags) | sed 's/^v//')
COMMIT := $(shell git log -1 --format='%H')
# TODO: Update the ldflags with the app, client & server names
ldflags = -X github.com/saiSunkari19/ibc-demo/version.Name=IBC-DEMO \
-X github.com/saiSunkari19/ibc-demo/version.ServerName=assetd \
-X github.com/saiSunkari19/ibc-demo/version.ClientName=assetcli \
-X github.com/saiSunkari19/ibc-demo/version.Version=$(VERSION) \
-X github.com/saiSunkari19/ibc-demo/version.Commit=$(COMMIT)
BUILD_FLAGS := -ldflags '$(ldflags)'
all: install
install: go.sum
go install $(BUILD_FLAGS) ./cmd/assetd
go install $(BUILD_FLAGS) ./cmd/assetcli
go.sum: go.mod
@echo "--> Ensure dependencies have not been modified"
GO111MODULE=on go mod verify
# Uncomment when you have some tests
# test:
# @go test -mod=readonly $(PACKAGES)
# look into .golangci.yml for enabling / disabling linters
lint:
@echo "--> Running linter"
@golangci-lint run
@go mod verify