Skip to content

Commit a15f0c1

Browse files
author
Ma Shimiao
committed
Makefile: Add missing COMMIT and EPOCH_TST_COMMIT
Signed-off-by: Ma Shimiao <[email protected]>
1 parent a4708e3 commit a15f0c1

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)