From d9e5e41df39d8487e4dd0da7aad993eb17cfa237 Mon Sep 17 00:00:00 2001 From: Dennis Chen Date: Fri, 28 Jul 2017 10:53:28 +0000 Subject: [PATCH] package.mk: Adjust the targe sequence to avoid early abort Current package.mk will operate on the first dependence object 'check-dirty', which will result the make process abort earlier with below message: pkg/package.mk:60: *** Your repository is not clean. Will not push package image. Stop. This is not expected behavior since we have no chance to build a docker image locally in case of the user has no intention to push that image. This patch adjust the dependece order for the default target, thus we can build the docker image locally but can't push that image since we're in a dirty git repository. Signed-off-by: Dennis Chen --- pkg/package.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/package.mk b/pkg/package.mk index 7f0d7ba9d..f65df4480 100644 --- a/pkg/package.mk +++ b/pkg/package.mk @@ -60,14 +60,14 @@ ifneq ($(DIRTY),) $(error Your repository is not clean. Will not push package image) endif -push: check-dirty tag +push: tag check-dirty docker pull $(TAG) || docker push $(TAG) ifneq ($(RELEASE),) docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE) docker push $(ORG)/$(IMAGE):$(RELEASE) endif -forcepush: check-dirty forcetag +forcepush: forcetag check-dirty docker push $(TAG) ifneq ($(RELEASE),) docker tag $(TAG) $(ORG)/$(IMAGE):$(RELEASE)