diff --git a/Makefile b/Makefile index d5d1d9b..a66b3ff 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -VERSION ?= $(shell git describe --tags --always --dirty=dev) +VERSION ?= $(shell git describe --tags --always --dirty=-dev) TEMPLATES := $(shell find src/ -type f) .DEFAULT_GOAL := help msg = $(if $(tprint),$(call tprint,{a.bold}==> {a.magenta}$(1){a.end}),@echo '==> $(1)') diff --git a/src/builtins.mk b/src/builtins.mk index fb12182..562afce 100644 --- a/src/builtins.mk +++ b/src/builtins.mk @@ -21,9 +21,9 @@ _print-ansi: ## show all possible ansi color code combinations tprint = $(call py,print_py,$(1)) tprint-sh = $(call pysh,print_py,$(1)) tconfirm = $(call py,confirm_py,$(1)) -_update-task.mk: ## downloads latest development version of task.mk +_update-task.mk: ## downloads version of task.mk (TASKMK_VERSION=) $(call tprint,{a.b_cyan}Updating task.mk{a.end}) - curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk + curl https://raw.githubusercontent.com/daylinmorgan/task.mk/$(TASKMK_VERSION)/task.mk -o .task.mk .PHONY: h help _help _print-ansi _update-task.mk TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST)) export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST diff --git a/src/header.mk b/src/header.mk index 93dc499..cbd20dd 100644 --- a/src/header.mk +++ b/src/header.mk @@ -1,8 +1,7 @@ # }> [github.com/daylinmorgan/task.mk] <{ # # Copyright (c) 2022 Daylin Morgan # MIT License -# version: ##- version -## -# +TASKMK_VERSION ?= ##- version -## # task.mk should be included at the bottom of your Makefile with `-include .task.mk` # See below for the standard configuration options that should be set prior to including this file. # You can update your .task.mk with `make _update-task.mk` diff --git a/task.mk b/task.mk index c2224d7..8fc3916 100644 --- a/task.mk +++ b/task.mk @@ -1,8 +1,7 @@ # }> [github.com/daylinmorgan/task.mk] <{ # # Copyright (c) 2022 Daylin Morgan # MIT License -# version: v22.9.28-17-g365e0e1dev -# +TASKMK_VERSION ?= v22.9.28-18-g3873df0-dev # task.mk should be included at the bottom of your Makefile with `-include .task.mk` # See below for the standard configuration options that should be set prior to including this file. # You can update your .task.mk with `make _update-task.mk` @@ -41,11 +40,11 @@ _print-ansi: ## show all possible ansi color code combinations $(call py,print_ansi_py) # functions to take f-string literals and pass to python print tprint = $(call py,print_py,$(1)) -tprint-sh = $(call pysh,print_py,$(1)) +tprint-verbose= $(call py-verbose,print_py,$(1)) tconfirm = $(call py,confirm_py,$(1)) -_update-task.mk: ## downloads latest development version of task.mk +_update-task.mk: ## downloads version of task.mk (TASKMK_VERSION=) $(call tprint,{a.b_cyan}Updating task.mk{a.end}) - curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk + curl https://raw.githubusercontent.com/daylinmorgan/task.mk/$(TASKMK_VERSION)/task.mk -o .task.mk .PHONY: h help _help _print-ansi _update-task.mk TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST)) export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST