Skip to content

Commit c6b3e79

Browse files
author
Mrunal Patel
authored
Merge pull request #1017 from WeiZhang555/version-dirty
Append string "-dirty" to version if git repo is unclean
2 parents 5648663 + 9f80653 commit c6b3e79

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ TEST_DOCKERFILE := script/test_Dockerfile
1212
BUILDTAGS := seccomp
1313
RUNC_BUILD_PATH := /go/src/github.com/opencontainers/runc/runc
1414
RUNC_INSTANCE := runc_dev
15-
COMMIT := $(shell git rev-parse HEAD 2> /dev/null || true)
15+
COMMIT_NO := $(shell git rev-parse HEAD 2> /dev/null || true)
16+
COMMIT := $(if $(shell git status --porcelain --untracked-files=no),"${COMMIT_NO}-dirty","${COMMIT_NO}")
1617
RUNC_LINK := $(CURDIR)/Godeps/_workspace/src/github.com/opencontainers/runc
1718
export GOPATH := $(CURDIR)/Godeps/_workspace
1819

0 commit comments

Comments
 (0)