mirror of
https://github.com/status-im/status-go.git
synced 2025-02-19 18:28:18 +00:00
fix getting git commit in Makefile (#1181)
This commit is contained in:
parent
0136ceb46e
commit
e8c6841f30
5
Makefile
5
Makefile
@ -27,8 +27,9 @@ endif
|
|||||||
|
|
||||||
CGO_CFLAGS = -I/$(JAVA_HOME)/include -I/$(JAVA_HOME)/include/darwin
|
CGO_CFLAGS = -I/$(JAVA_HOME)/include -I/$(JAVA_HOME)/include/darwin
|
||||||
GOBIN = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))build/bin
|
GOBIN = $(dir $(realpath $(firstword $(MAKEFILE_LIST))))build/bin
|
||||||
GIT_COMMIT = $(shell git describe --exact-match --tag 2>/dev/null | sed 's/^v\(.*\)$$/\1/' \
|
GIT_COMMIT = $(shell tag=`git describe --exact-match --tag 2>/dev/null`; \
|
||||||
|| git rev-parse --short HEAD)
|
if [ $$? -eq 0 ]; then echo $$tag | sed 's/^v\(.*\)$$/\1/'; \
|
||||||
|
else git rev-parse --short HEAD; fi)
|
||||||
AUTHOR = $(shell echo $$USER)
|
AUTHOR = $(shell echo $$USER)
|
||||||
|
|
||||||
BUILD_FLAGS ?= $(shell echo "-ldflags '-X main.buildStamp=`date -u '+%Y-%m-%d.%H:%M:%S'` -X github.com/status-im/status-go/params.Version=$(GIT_COMMIT)'")
|
BUILD_FLAGS ?= $(shell echo "-ldflags '-X main.buildStamp=`date -u '+%Y-%m-%d.%H:%M:%S'` -X github.com/status-im/status-go/params.Version=$(GIT_COMMIT)'")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user