mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 01:59:07 +00:00
pkg: Do not mark user supplied HASH as dirty
If a user passes a HASH e.g. HASH=dev then assume they know what they are doing and don't need dirty tracking. Signed-off-by: Ian Campbell <ian.campbell@docker.com>
This commit is contained in:
parent
bdd7e7163b
commit
7fd155b38d
@ -2,15 +2,19 @@
|
||||
default: push
|
||||
|
||||
ORG?=linuxkit
|
||||
ifeq ($(HASH),)
|
||||
HASH_COMMIT?=HEAD # Setting this is only really useful with the show-tag target
|
||||
HASH?=$(shell git ls-tree --full-tree $(HASH_COMMIT) -- $(CURDIR) | awk '{print $$3}')
|
||||
BASE_DEPS=Dockerfile Makefile
|
||||
|
||||
ifneq ($(HASH_COMMIT),HEAD) # Others can't be dirty by definition
|
||||
DIRTY=$(shell git diff-index --quiet HEAD -- $(CURDIR) || echo "-dirty")
|
||||
endif
|
||||
endif
|
||||
|
||||
TAG=$(ORG)/$(IMAGE):$(HASH)$(DIRTY)
|
||||
|
||||
BASE_DEPS=Dockerfile Makefile
|
||||
|
||||
# Get a release tag, if present
|
||||
RELEASE=$(shell git tag -l --points-at HEAD)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user