forked from Jeongseup/ludiumapp-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
41 lines (32 loc) · 1.07 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
34
35
36
37
38
39
40
41
# BRANCH := $(shell git rev-parse --abbrev-ref HEAD)
# COMMIT := $(shell git log -1 --format='%H')
# don't override user values
ifeq (,$(VERSION))
VERSION := $(shell git describe --exact-match 2>/dev/null)
# if VERSION is empty, then populate it with branch's name and raw commit hash
ifeq (,$(VERSION))
VERSION := $(BRANCH)-$(COMMIT)
endif
endif
# Update the ldflags with the app, client & server names
ldflags = -X github.com/cosmos/cosmos-sdk/version.Name=ludiumappd \
-X github.com/cosmos/cosmos-sdk/version.AppName=ludiumappd \
-X github.com/cosmos/cosmos-sdk/version.Version=$(VERSION) \
-X github.com/cosmos/cosmos-sdk/version.Commit=$(COMMIT)
BUILD_FLAGS := -ldflags '$(ldflags)'
###########
# Install #
###########
all: install
install:
@echo "--> ensure dependencies have not been modified"
@go mod verify
@echo "--> installing ludiumappd"
@go install $(BUILD_FLAGS) -mod=readonly ./ludiumappd
init-demo-chain: install
@echo "--> init new demo chain"
./scripts/init.sh
@echo "--> start the chain"
./scripts/start.sh
proto-gen:
@./scripts/protogen.sh