Compare commits

..

3 commits

4 changed files with 18 additions and 6 deletions

View file

@ -11,5 +11,5 @@ PHONIFY = 1
-include .task.mk
.task.mk: $(TEMPLATES) generate.py
$(call msg,re-jinjaing the local {a.b_cyan}.task.mk{a.end})
$(call msg,re-jinjaing the local $(if $(tprint),{a.b_cyan}.task.mk{a.end},.task.mk))
@./generate.py $(VERSION) > .task.mk || (echo "generator failed!!" && rm .task.mk)

View file

@ -25,8 +25,8 @@ assets: ## generate assets
define release_sh
./generate.py $(subst v,,$(VERSION)) > task.mk
sed -i 's/task.mk\/.*\/task.mk/task.mk\/$(VERSION)\/task.mk/g' README.md docs/index.md
sed -i 's/TASKMK_VERSION=.*/TASKMK_VERSION=$(VERSION)/' docs/init
git add task.mk README.md docs/index.md
sed -i 's/TASKMK_VERSION=.*/TASKMK_VERSION="$(VERSION)"/' docs/init
git add task.mk README.md docs/{index.md,init}
git commit -m "release: $(VERSION)" --no-verify
git tag $(VERSION)
endef

View file

@ -14,7 +14,13 @@ def check_item(item):
def main():
items = " ".join((i["goal"] for i in parse_help(gen_makefile(),require_msg=False) if check_item(i)))
items = " ".join(
(
i["goal"]
for i in parse_help(gen_makefile(), require_msg=False)
if check_item(i)
)
)
sys.stdout.write(".PHONY: " + items)

10
task.mk
View file

@ -1,7 +1,7 @@
# }> [github.com/daylinmorgan/task.mk] <{ #
# Copyright (c) 2022 Daylin Morgan
# MIT License
TASKMK_VERSION ?= v23.1.1-10-ge85d61c-dev
TASKMK_VERSION ?= v23.1.1-12-gb0f7493-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`
@ -330,7 +330,13 @@ def check_item(item):
args = parseargs(item.get("msgargs", ""))
return not args.not_phony
def main():
items = " ".join((i["goal"] for i in parse_help(gen_makefile(),require_msg=False) if check_item(i)))
items = " ".join(
(
i["goal"]
for i in parse_help(gen_makefile(), require_msg=False)
if check_item(i)
)
)
sys.stdout.write(".PHONY: " + items)
if __name__ == "__main__":
main()