feat: use version in _update-task.mk

This commit is contained in:
Daylin Morgan 2023-01-20 12:35:52 -06:00
parent 3873df00ce
commit 13ea08104d
4 changed files with 8 additions and 10 deletions

View File

@ -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)')

View File

@ -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

View File

@ -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`

View File

@ -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