mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-23 02:10:45 -06:00
Compare commits
No commits in common. "891e4133aa64ab586abbb8bd9c87a1a6588a7a84" and "18dfd8b5e528d133296a6a67ba81d5239b201c38" have entirely different histories.
891e4133aa
...
18dfd8b5e5
6 changed files with 16 additions and 14 deletions
5
Makefile
5
Makefile
|
@ -41,9 +41,12 @@ c clean: ## remove the generated files
|
|||
define version_check_sh
|
||||
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;
|
||||
elif [[ "${VERSION}" == *'-'* ]]; then
|
||||
elif [[ "${VERSION}" == *'-'* ]]; then
|
||||
$(call tprint-verbose,{a.red}VERSION INVALID!{a.end} Uncommited or untagged work); 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
|
||||
endef
|
||||
|
||||
|
|
11
README.md
11
README.md
|
@ -13,9 +13,8 @@
|
|||
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.
|
||||
|
||||
`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).
|
||||
You can deploy it alongside your own to add some QOL improvements for your users and fellow maintainers.
|
||||
|
||||
`Task.mk`, is a standalone `Makefile` you can deploy alongside your own
|
||||
to add some QOL improvements for your users and fellow maintainers.
|
||||
|
||||
Current Features:
|
||||
|
||||
|
@ -28,7 +27,7 @@ Current Features:
|
|||
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.
|
||||
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/v2024.1001/task.mk)
|
||||
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/blob/main/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.
|
||||
|
||||
## Setup
|
||||
|
@ -43,14 +42,14 @@ If someone tries to invoke `make help` it will download `.task.mk` for them.
|
|||
|
||||
```make
|
||||
-include .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 $(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 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
|
||||
-include .task.mk
|
||||
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .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)
|
||||
```
|
||||
|
||||
For more info see the [documentation](https://gh.dayl.in/task.mk).
|
||||
|
|
|
@ -27,7 +27,7 @@ Current Features:
|
|||
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.
|
||||
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/v2024.1001/task.mk)
|
||||
I agree, all you need is one file [`.task.mk`](https://github.com/daylinmorgan/task.mk/blob/main/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.
|
||||
|
||||
## Setup
|
||||
|
@ -42,14 +42,14 @@ If someone tries to invoke `make help` it will download `.task.mk` for them.
|
|||
|
||||
```make
|
||||
-include .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 $(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 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
|
||||
-include .task.mk
|
||||
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v2024.1001/task.mk -o .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)
|
||||
```
|
||||
|
||||
For more info see the [documentation](https://gh.dayl.in/task.mk).
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env bash
|
||||
set -e
|
||||
LATEST_TASKMK_VERSION="v2024.1001"
|
||||
LATEST_TASKMK_VERSION="v23.1.2"
|
||||
VERSION=${TASKMK_VERSION:-$LATEST_TASKMK_VERSION}
|
||||
printf "Initializing Task.mk (%s) for repo\n" "$VERSION"
|
||||
if [ -f "./.task.mk" ]; then
|
||||
|
|
|
@ -11,4 +11,4 @@ WRAP ?= 100
|
|||
# python f-string literals
|
||||
EPILOG ?=
|
||||
USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n
|
||||
PHONIFY ?= 1
|
||||
PHONIFY ?=
|
||||
|
|
4
task.mk
4
task.mk
|
@ -1,7 +1,7 @@
|
|||
# }> [github.com/daylinmorgan/task.mk] <{ #
|
||||
# Copyright (c) 2022 Daylin Morgan
|
||||
# MIT License
|
||||
TASKMK_VERSION ?= 2024.1001
|
||||
TASKMK_VERSION ?= 23.1.2
|
||||
# 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`
|
||||
|
@ -19,7 +19,7 @@ WRAP ?= 100
|
|||
# python f-string literals
|
||||
EPILOG ?=
|
||||
USAGE ?={ansi.header}usage{ansi.end}:\n make <recipe>\n
|
||||
PHONIFY ?= 1
|
||||
PHONIFY ?=
|
||||
# ---- [python scripts] ---- #
|
||||
define help_py
|
||||
from collections import namedtuple
|
||||
|
|
Loading…
Reference in a new issue