-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathMakefile
More file actions
29 lines (21 loc) · 730 Bytes
/
Makefile
File metadata and controls
29 lines (21 loc) · 730 Bytes
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
VERSION := $(shell git describe --tags --always)
GIT_COMMIT_ID := $(shell git rev-parse HEAD)
GOPERUN_VERSION := $(shell grep "go-perun" go.mod | cut -d "v" -f2)
NODE_PKG := ./cmd/perunnode
NODE_BIN := perunnode
CLI_PKG := ./cmd/perunnodecli
CLI_BIN := perunnodecli
TUI_PKG := ./cmd/perunnodetui
TUI_BIN := perunnodetui
DEMO_DIR := demo
LDFLAGS=-ldflags "-X 'main.version=$(VERSION)' -X 'main.gitCommitID=$(GIT_COMMIT_ID)' -X 'main.goperunVersion=$(GOPERUN_VERSION)'"
install:
go install $(LDFLAGS) $(NODE_PKG)
go install $(CLI_PKG)
go install $(TUI_PKG)
generate: install
@mkdir $(DEMO_DIR)
@cd $(DEMO_DIR) && $(NODE_BIN) generate
@echo "Configuration files for demo generated in ./$(DEMO_DIR)"
clean:
rm -rf demo