Compare commits

..

4 commits

Author SHA1 Message Date
891e4133aa
release: v2024.1001 2024-10-19 16:12:12 -05:00
860a5031a9
simplify version check 2024-10-19 16:12:03 -05:00
1ecc7f9f34
make phonify the default 2024-10-19 16:11:57 -05:00
2f9173871b
docs: readme wording 2024-10-18 12:24:11 -05:00
6 changed files with 14 additions and 16 deletions

View file

@ -41,12 +41,9 @@ c clean: ## remove the generated files
define version_check_sh define version_check_sh
if git rev-parse -q --verify "refs/tags/${VERSION}" >/dev/null; then if git rev-parse -q --verify "refs/tags/${VERSION}" >/dev/null; then
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} tag already exists); exit 1; $(call tprint-verbose,{a.red}VERSION INVALID!{a.end} tag already exists); exit 1;
elif [[ "${VERSION}" == *'-'* ]]; then elif [[ "${VERSION}" == *'-'* ]]; then
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Uncommited or untagged work); exit 1; $(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Uncommited or untagged work); exit 1;
exit 1 exit 1
elif [[ $(shell echo "${VERSION}" | awk -F. '{ print NF }') -lt 3 ]];then\
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Expected CalVer string)
exit 1
fi fi
endef endef

View file

@ -13,8 +13,9 @@
GNU make is an excellent build tool and the task runner we love to hate, but can't escape. GNU make is an excellent build tool and the task runner we love to hate, but can't escape.
So let's improve the UX to make it the best task runner it can be. So let's improve the UX to make it the best task runner it can be.
`Task.mk`, is a standalone `Makefile` you can deploy alongside your own `Task.mk`, is a standalone `Makefile` powered by a little magic (code golfing `python` inside of `make`) and little luck (absurd string manipulation and regexes).
to add some QOL improvements for your users and fellow maintainers. You can deploy it alongside your own to add some QOL improvements for your users and fellow maintainers.
Current Features: Current Features:
@ -27,7 +28,7 @@ Current Features:
Depends on `GNU Make`, obviously and `Python >=3.7`, and `bash` (or `zsh`). Depends on `GNU Make`, obviously and `Python >=3.7`, and `bash` (or `zsh`).
Wait python?!?!, I'm not `pip` installing some package just to parse my makefile. Wait python?!?!, I'm not `pip` installing some package just to parse my makefile.
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/blob/main/task.mk) I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/v2024.1001/task.mk)
You can automagically include it with just two additional lines to your `Makefile` (and probably one to your `.gitignore`) and you're good to go. You can automagically include it with just two additional lines to your `Makefile` (and probably one to your `.gitignore`) and you're good to go.
## Setup ## Setup
@ -42,14 +43,14 @@ If someone tries to invoke `make help` it will download `.task.mk` for them.
```make ```make
-include .task.mk -include .task.mk
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk)) $(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk))
``` ```
If you plan to use any features besides the help prompt you may want to instead commit `.task.mk` to version control or drop the `$(MAKECMDGOALS)` check so it's always downloaded once `make` is invoked. If you plan to use any features besides the help prompt you may want to instead commit `.task.mk` to version control or drop the `$(MAKECMDGOALS)` check so it's always downloaded once `make` is invoked.
```make ```make
-include .task.mk -include .task.mk
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk) $(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk)
``` ```
For more info see the [documentation](https://gh.dayl.in/task.mk). For more info see the [documentation](https://gh.dayl.in/task.mk).

View file

@ -27,7 +27,7 @@ Current Features:
Depends on `GNU Make`, obviously and `Python >=3.7`, and `bash` (or `zsh`). Depends on `GNU Make`, obviously and `Python >=3.7`, and `bash` (or `zsh`).
Wait python?!?!, I'm not `pip` installing some package just to parse my makefile. Wait python?!?!, I'm not `pip` installing some package just to parse my makefile.
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/blob/main/task.mk) I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/v2024.1001/task.mk)
You can automagically include it with just two additional lines to your `Makefile` (and probably one to your `.gitignore`) and you're good to go. You can automagically include it with just two additional lines to your `Makefile` (and probably one to your `.gitignore`) and you're good to go.
## Setup ## Setup
@ -42,14 +42,14 @@ If someone tries to invoke `make help` it will download `.task.mk` for them.
```make ```make
-include .task.mk -include .task.mk
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk)) $(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk))
``` ```
If you plan to use any features besides the help prompt you may want to instead commit `.task.mk` to version control or drop the `$(MAKECMDGOALS)` check so it's always downloaded once `make` is invoked. If you plan to use any features besides the help prompt you may want to instead commit `.task.mk` to version control or drop the `$(MAKECMDGOALS)` check so it's always downloaded once `make` is invoked.
```make ```make
-include .task.mk -include .task.mk
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk) $(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .task.mk)
``` ```
For more info see the [documentation](https://gh.dayl.in/task.mk). For more info see the [documentation](https://gh.dayl.in/task.mk).

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash #!/usr/bin/env bash
set -e set -e
LATEST_TASKMK_VERSION="v23.1.2" LATEST_TASKMK_VERSION="v2024.1001"
VERSION=${TASKMK_VERSION:-$LATEST_TASKMK_VERSION} VERSION=${TASKMK_VERSION:-$LATEST_TASKMK_VERSION}
printf "Initializing Task.mk (%s) for repo\n" "$VERSION" printf "Initializing Task.mk (%s) for repo\n" "$VERSION"
if [ -f "./.task.mk" ]; then if [ -f "./.task.mk" ]; then

View file

@ -11,4 +11,4 @@ WRAP ?= 100
# python f-string literals # python f-string literals
EPILOG ?= EPILOG ?=
USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n
PHONIFY ?= PHONIFY ?= 1

View file

@ -1,7 +1,7 @@
# }> [github.com/daylinmorgan/task.mk] <{ # # }> [github.com/daylinmorgan/task.mk] <{ #
# Copyright (c) 2022 Daylin Morgan # Copyright (c) 2022 Daylin Morgan
# MIT License # MIT License
TASKMK_VERSION ?= 23.1.2 TASKMK_VERSION ?= 2024.1001
# task.mk should be included at the bottom of your Makefile with `-include .task.mk` # 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. # 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` # You can update your .task.mk with `make _update-task.mk`
@ -19,7 +19,7 @@ WRAP ?= 100
# python f-string literals # python f-string literals
EPILOG ?= EPILOG ?=
USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n
PHONIFY ?= PHONIFY ?= 1
# ---- [python scripts] ---- # # ---- [python scripts] ---- #
define help_py define help_py
from collections import namedtuple from collections import namedtuple