mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-22 01:50:44 -06:00
Compare commits
3 commits
34b758f100
...
72ec8e1ba2
Author | SHA1 | Date | |
---|---|---|---|
72ec8e1ba2 | |||
556b679784 | |||
c4304e9f28 |
4 changed files with 7 additions and 8 deletions
5
Makefile
5
Makefile
|
@ -37,8 +37,7 @@ list-%:
|
||||||
.PHONY: release
|
.PHONY: release
|
||||||
release: version-check
|
release: version-check
|
||||||
$(call msg,Release Project)
|
$(call msg,Release Project)
|
||||||
# @./generate.py $(VERSION) > task.mk
|
@./generate.py $(VERSION) > task.mk
|
||||||
@./make task.mk
|
|
||||||
@sed -i 's/task.mk\/.*\/task.mk/task.mk\/v$(VERSION)\/task.mk/g' README.md
|
@sed -i 's/task.mk\/.*\/task.mk/task.mk\/v$(VERSION)\/task.mk/g' README.md
|
||||||
@git add task.mk README.md
|
@git add task.mk README.md
|
||||||
@git commit -m "release: v$(VERSION)" --no-verify
|
@git commit -m "release: v$(VERSION)" --no-verify
|
||||||
|
@ -83,7 +82,7 @@ endef
|
||||||
## info | demonstrate usage of tprint
|
## info | demonstrate usage of tprint
|
||||||
.PHONY: task
|
.PHONY: task
|
||||||
info:
|
info:
|
||||||
$(call msg, Info Message)
|
$(call msg,Info Message)
|
||||||
$(call tprint,{a.black_on_cyan}This is task-print output:{a.end})
|
$(call tprint,{a.black_on_cyan}This is task-print output:{a.end})
|
||||||
$(call tprint,$(mlmsg))
|
$(call tprint,$(mlmsg))
|
||||||
$(call tprint,{a.custom(fg=(148, 255, 15),bg=(103, 2, 15))}Custom Colors TOO!{a.end})
|
$(call tprint,{a.custom(fg=(148, 255, 15),bg=(103, 2, 15))}Custom Colors TOO!{a.end})
|
||||||
|
|
|
@ -30,14 +30,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/v22.9.7/task.mk -o .task.mk))
|
$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v22.9.12/task.mk -o .task.mk))
|
||||||
```
|
```
|
||||||
|
|
||||||
You might also consider making it a consistently downloaded dependency if you plan to use any of it's advanced feature set, by dropping the `$(MAKECMDGOALS)` check.
|
You might also consider making it a consistently downloaded dependency if you plan to use any of it's advanced feature set, by dropping the `$(MAKECMDGOALS)` check.
|
||||||
|
|
||||||
```make
|
```make
|
||||||
-include .task.mk
|
-include .task.mk
|
||||||
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v22.9.7/task.mk -o .task.mk)
|
$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v22.9.12/task.mk -o .task.mk)
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
|
@ -33,7 +33,7 @@ goal_len = max(len(goal[0]) for goal in goals)
|
||||||
|
|
||||||
for goal, msg in goals:
|
for goal, msg in goals:
|
||||||
print(
|
print(
|
||||||
f"{ansi.$(GOAL_COLOR)}{goal:>{goal_len}}{ansi.end} $(HELP_SEP) {ansi.$(MSG_COLOR)}{msg}{ansi.end}"
|
f" {ansi.$(GOAL_COLOR)}{goal:>{goal_len}}{ansi.end} $(HELP_SEP) {ansi.$(MSG_COLOR)}{msg}{ansi.end}"
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"""$(EPILOG)""")
|
print(f"""$(EPILOG)""")
|
||||||
|
|
4
task.mk
4
task.mk
|
@ -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
|
||||||
# version: v22.9.7-4-gd395d7e-dev
|
# version: v22.9.12-dev
|
||||||
#
|
#
|
||||||
# task.mk should be included at the bottom of your Makefile.
|
# task.mk should be included at the bottom of your Makefile.
|
||||||
# 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.
|
||||||
|
@ -127,7 +127,7 @@ goal_len = max(len(goal[0]) for goal in goals)
|
||||||
|
|
||||||
for goal, msg in goals:
|
for goal, msg in goals:
|
||||||
print(
|
print(
|
||||||
f"{ansi.$(GOAL_COLOR)}{goal:>{goal_len}}{ansi.end} $(HELP_SEP) {ansi.$(MSG_COLOR)}{msg}{ansi.end}"
|
f" {ansi.$(GOAL_COLOR)}{goal:>{goal_len}}{ansi.end} $(HELP_SEP) {ansi.$(MSG_COLOR)}{msg}{ansi.end}"
|
||||||
)
|
)
|
||||||
|
|
||||||
print(f"""$(EPILOG)""")
|
print(f"""$(EPILOG)""")
|
||||||
|
|
Loading…
Reference in a new issue