From df408bddf9a88535350050084ad7599e70bc4724 Mon Sep 17 00:00:00 2001 From: Sheogorath <sheogorath@shivering-isles.com> Date: Wed, 11 May 2022 02:13:51 +0200 Subject: [PATCH] feat(Makefile): Add help output to container build This patch adds some basic help output to the demo container build. It adds the general help information to the container-build library file. The helper include itself is put at the top level, to reduce dependencies and making the help output optional. This way custom help commands can still be defined if wanted without any potential of conflicting with the one from the utils file. --- images/.utils/container-build.mk | 16 ++++++++-------- images/demo/Makefile | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/images/.utils/container-build.mk b/images/.utils/container-build.mk index 520df59c2..447a314e2 100644 --- a/images/.utils/container-build.mk +++ b/images/.utils/container-build.mk @@ -32,7 +32,7 @@ DOCKER_FILE_PATH=Containerfile .PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showver \ push pre-push do-push post-push -build: pre-build docker-build post-build +build: pre-build docker-build post-build ## build and tag container pre-build: @@ -59,18 +59,18 @@ docker-build: .release @cat .release -release: check-status check-release build push +release: check-status check-release build push ## build release from current git tag and push to registry -push: pre-push do-push post-push +push: pre-push do-push post-push ## Push current image to registry do-push: podman push $(IMAGE):$(VERSION) podman push $(IMAGE):latest -snapshot: build push +snapshot: build push ## Build current state and push to registry -showver: .release +showver: .release ## Print current container tag @. $(RELEASE_SUPPORT); getVersion tag-patch-release: VERSION := $(shell . $(RELEASE_SUPPORT); nextPatchLevel) @@ -82,13 +82,13 @@ tag-minor-release: .release tag tag-major-release: VERSION := $(shell . $(RELEASE_SUPPORT); nextMajorLevel) tag-major-release: .release tag -patch-release: tag-patch-release release +patch-release: tag-patch-release release ## Release new patch version @echo $(VERSION) -minor-release: tag-minor-release release +minor-release: tag-minor-release release ## Release new minor version @echo $(VERSION) -major-release: tag-major-release release +major-release: tag-major-release release ## Release new major version @echo $(VERSION) diff --git a/images/demo/Makefile b/images/demo/Makefile index 0869882fc..ef36bf84f 100644 --- a/images/demo/Makefile +++ b/images/demo/Makefile @@ -1,4 +1,5 @@ include ../.utils/container-build.mk +include ../../utils/help.mk pre-build: @echo do some stuff before the docker build -- GitLab