Skip to content

Commit bbcfc13

Browse files
authored
Merge pull request #269 from celestiaorg/hlib/tag-test
2 parents bd0b03a + 3ac18b7 commit bbcfc13

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

Diff for: Makefile

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
SHELL=/usr/bin/env bash
22
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)'"
74

85
## help: Get more info on make commands.
96
help: Makefile
@@ -14,13 +11,13 @@ help: Makefile
1411
## build: Build celestia-node binary.
1512
build:
1613
@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
1815
.PHONY: build
1916

2017
## install: Builds and installs the celestia-node binary into the GOBIN directory.
2118
install:
2219
@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
2421
.PHONY: install
2522

2623
## fmt: Formats only *.go (excluding *.pb.go *pb_test.go). Runs `gofmt & goimports` internally.

0 commit comments

Comments
 (0)