Skip to content

Commit 12ece37

Browse files
authored
Merge pull request #133 from Mashimiao/makefile-add-missing-evars
Makefile: Add missing COMMIT and EPOCH_TST_COMMIT
2 parents d62cbff + a15f0c1 commit 12ece37

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ export GO15VENDOREXPERIMENT
33
PREFIX ?= $(DESTDIR)/usr
44
BINDIR ?= $(DESTDIR)/usr/bin
55

6+
COMMIT=$(shell git rev-parse HEAD 2> /dev/null || true)
7+
EPOCH_TEST_COMMIT ?= $(shell git tag | tail -1)
68

79
default: all
810

@@ -27,7 +29,7 @@ check-license:
2729

2830
.PHONY: tool
2931
tool:
30-
go build -o oci-image-tool ./cmd/oci-image-tool
32+
go build -ldflags "-X main.gitCommit=${COMMIT}" -o oci-image-tool ./cmd/oci-image-tool
3133

3234

3335
all: tool man

0 commit comments

Comments
 (0)