Commit 3717fdb2 by Chavee Issariyapat

Update Makefile

parent 13e5924f
# a helper shell script # a helper shell script
# version 1.1 MAKE_VERSION=1.1.2
define MAKEFUNCTIONCODE define MAKEFUNCTIONCODE
function hasChanges() { function hasChanges() {
...@@ -106,8 +106,8 @@ TAG=$(shell . $(RELEASE_SUPPORT); getTag) ...@@ -106,8 +106,8 @@ TAG=$(shell . $(RELEASE_SUPPORT); getTag)
RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-function RELEASE_SUPPORT := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))/.make-function
export MAKEFUNCTIONCODE export MAKEFUNCTIONCODE
.PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showtag \ .PHONY: pre-build docker-build post-build build release patch-release minor-release major-release tag check-status check-release showtag show-tag \
push do-push post-push post-init push do-push post-push post-init update-make
init: init:
@echo "$$MAKEFUNCTIONCODE" > ./.make-function @echo "$$MAKEFUNCTIONCODE" > ./.make-function
...@@ -147,6 +147,10 @@ do-push: ...@@ -147,6 +147,10 @@ do-push:
snapshot: build push snapshot: build push
show-tag: init release.conf
@. $(RELEASE_SUPPORT); getVersion
@rm .make-function
showtag: init release.conf showtag: init release.conf
@. $(RELEASE_SUPPORT); getVersion @. $(RELEASE_SUPPORT); getVersion
@rm .make-function @rm .make-function
...@@ -188,3 +192,11 @@ check-status: init ...@@ -188,3 +192,11 @@ check-status: init
check-release: init release.conf post-init check-release: init release.conf post-init
@. $(RELEASE_SUPPORT) ; tagExists $(TAG) || (echo "ERROR: version not yet tagged in git. make [minor,major,patch]-release." >&2 && exit 1) ; @. $(RELEASE_SUPPORT) ; tagExists $(TAG) || (echo "ERROR: version not yet tagged in git. make [minor,major,patch]-release." >&2 && exit 1) ;
@. $(RELEASE_SUPPORT) ; ! differsFromRelease $(TAG) || (echo "ERROR: current directory differs from tagged $(TAG). make [minor,major,patch]-release." ; exit 1) @. $(RELEASE_SUPPORT) ; ! differsFromRelease $(TAG) || (echo "ERROR: current directory differs from tagged $(TAG). make [minor,major,patch]-release." ; exit 1)
update-make: init
@rm Makefile
wget https://dev.nexpie.com/sample/docker-makefile-sample/raw/master/Makefile
@rm .make-function
make-version:
@echo $(MAKE_VERSION)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment