mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-21 01:59:07 +00:00
Merge pull request #2294 from ijc/pkg-forcepush
pkg: Add forcepush target
This commit is contained in:
commit
b8f7b7aad0
@ -1,4 +1,4 @@
|
|||||||
.PHONY: image tag show-tag
|
.PHONY: image tag forcetag show-tag check-dirty push forcepush
|
||||||
default: push
|
default: push
|
||||||
|
|
||||||
ORG?=linuxkit
|
ORG?=linuxkit
|
||||||
@ -55,12 +55,21 @@ tag: $(BASE_DEPS) $(DEPS)
|
|||||||
forcetag: $(BASE_DEPS) $(DEPS)
|
forcetag: $(BASE_DEPS) $(DEPS)
|
||||||
docker build $(LABELS) $(NET_OPT) -t $(TAG) $(SOURCE)
|
docker build $(LABELS) $(NET_OPT) -t $(TAG) $(SOURCE)
|
||||||
|
|
||||||
push: tag
|
check-dirty:
|
||||||
ifneq ($(DIRTY),)
|
ifneq ($(DIRTY),)
|
||||||
$(error Your repository is not clean. Will not push package image.)
|
$(error Your repository is not clean. Will not push package image)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
push: check-dirty tag
|
||||||
docker pull $(TAG) || docker push $(TAG)
|
docker pull $(TAG) || docker push $(TAG)
|
||||||
ifneq ($(RELEASE),)
|
ifneq ($(RELEASE),)
|
||||||
docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)
|
docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)
|
||||||
docker push $(ORG)/$(IMAGE):$(RELEASE)
|
docker push $(ORG)/$(IMAGE):$(RELEASE)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
forcepush: check-dirty forcetag
|
||||||
|
docker push $(TAG)
|
||||||
|
ifneq ($(RELEASE),)
|
||||||
|
docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)
|
||||||
|
docker push $(ORG)/$(IMAGE):$(RELEASE)
|
||||||
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user