mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2025-02-05 09:14:17 -06:00
chore: reduce whitespace
This commit is contained in:
parent
4e2a771b8c
commit
2070819393
4 changed files with 3 additions and 15 deletions
2
Makefile
2
Makefile
|
@ -84,6 +84,8 @@ info:
|
||||||
$(call tprint,{a.b_magenta}This is task-print output:{a.end})
|
$(call tprint,{a.b_magenta}This is task-print output:{a.end})
|
||||||
$(call tprint,$(msg))
|
$(call tprint,$(msg))
|
||||||
|
|
||||||
|
task.mk:
|
||||||
|
./generate.py $(shell git describe --tags) > task.mk
|
||||||
|
|
||||||
define USAGE
|
define USAGE
|
||||||
{a.$(HEADER_COLOR)}usage:{a.end}
|
{a.$(HEADER_COLOR)}usage:{a.end}
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
define #% block name %##% endblock %#_py
|
define #% block name %##% endblock %#_py
|
||||||
|
|
||||||
#% block script %##% endblock %#
|
#% block script %##% endblock %#
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
#% extends "py-script.mk" %#
|
#% extends "py-script.mk" %#
|
||||||
#% block name %#vars#% endblock %#
|
#% block name %#vars#% endblock %#
|
||||||
#% block script %#
|
#% block script %#
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
##- '$(ansi_py)' -##
|
##- '$(ansi_py)' -##
|
||||||
|
|
13
task.mk
13
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
|
||||||
# 22.9.5
|
# v22.9.5-3-g9c67418
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
|
@ -103,7 +103,6 @@ pysh = printf "$(call create_string,$($(1)))" | python3
|
||||||
|
|
||||||
define help_py
|
define help_py
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
@ -141,12 +140,10 @@ for goal, msg in goals:
|
||||||
|
|
||||||
print(f"""$(EPILOG)""")
|
print(f"""$(EPILOG)""")
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define ansi_py
|
define ansi_py
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
@ -197,22 +194,18 @@ class Ansi:
|
||||||
|
|
||||||
a = ansi = Ansi()
|
a = ansi = Ansi()
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define info_py
|
define info_py
|
||||||
|
|
||||||
|
|
||||||
$(ansi_py)
|
$(ansi_py)
|
||||||
|
|
||||||
print(f"""$(2)""")
|
print(f"""$(2)""")
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define print_ansi_py
|
define print_ansi_py
|
||||||
|
|
||||||
|
|
||||||
$(ansi_py)
|
$(ansi_py)
|
||||||
|
|
||||||
codes_names = {
|
codes_names = {
|
||||||
|
@ -224,13 +217,10 @@ for code in sorted(codes_names.keys(), key=lambda item: (len(item), item)):
|
||||||
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
print("{:>20} {}".format(codes_names[code], code + "******" + ansi.end))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define vars_py
|
define vars_py
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
$(ansi_py)
|
$(ansi_py)
|
||||||
|
@ -245,6 +235,5 @@ for v in vars:
|
||||||
|
|
||||||
print()
|
print()
|
||||||
|
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue