File tree 1 file changed +3
-6
lines changed
1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change 1
1
SHELL =/usr/bin/env bash
2
2
PROJECTNAME =$(shell basename "$(PWD ) ")
3
- BUILD_DATE =$(shell date)
4
- LAST_COMMIT =$(shell git rev-parse HEAD)
5
- # TODO (@OrlandoRomo) get version from git tags
6
- CELESTIA_VERSION ="0.1.0"
3
+ LDFLAGS ="-X 'main.buildTime=$(shell date) ' -X 'main.lastCommit=$(shell git rev-parse HEAD) ' -X 'main.semanticVersion=$(shell git describe --tags --dirty=-dev) '"
7
4
8
5
# # help: Get more info on make commands.
9
6
help : Makefile
@@ -14,13 +11,13 @@ help: Makefile
14
11
# # build: Build celestia-node binary.
15
12
build :
16
13
@echo " --> Building Celestia"
17
- @go build -ldflags " -X 'main.buildTime= $( BUILD_DATE ) ' -X 'main.lastCommit= $( LAST_COMMIT ) ' -X 'main.semanticVersion= $( CELESTIA_VERSION ) ' " . /cmd/celestia
14
+ @go build -ldflags ${LDFLAGS} . /cmd/celestia
18
15
.PHONY : build
19
16
20
17
# # install: Builds and installs the celestia-node binary into the GOBIN directory.
21
18
install :
22
19
@echo " --> Installing Celestia"
23
- @go install -ldflags " -X 'main.buildTime= $( BUILD_DATE ) ' -X 'main.lastCommit= $( LAST_COMMIT ) ' -X 'main.semanticVersion= $( CELESTIA_VERSION ) ' " ./cmd/celestia
20
+ @go install -ldflags ${LDFLAGS} ./cmd/celestia
24
21
.PHONY : install
25
22
26
23
# # fmt: Formats only *.go (excluding *.pb.go *pb_test.go). Runs `gofmt & goimports` internally.
You can’t perform that action at this time.
0 commit comments