mirror of
https://github.com/daylinmorgan/task.mk.git
synced 2024-12-23 02:10:45 -06:00
Compare commits
No commits in common. "ef78914c3db0635ac50b09bfb11a1da86c16dc0e" and "b19ddbae68570e865b124574713860a120fd60b4" have entirely different histories.
ef78914c3d
...
b19ddbae68
4 changed files with 13 additions and 46 deletions
49
.github/workflows/docs.yml
vendored
49
.github/workflows/docs.yml
vendored
|
@ -1,52 +1,19 @@
|
||||||
name: GitHub Pages
|
name: docs
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: actions/setup-python@v2
|
||||||
- name: Setup Python
|
|
||||||
uses: actions/setup-python@v3
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.9'
|
python-version: 3.x
|
||||||
|
- run: pip install mkdocs-material \
|
||||||
|
mkdocs-git-revision-date-localized-plugin
|
||||||
|
- run: mkdocs gh-deploy --force
|
||||||
|
|
||||||
- name: Upgrade pip
|
|
||||||
run: |
|
|
||||||
# install pip=>20.1 to use "pip cache dir"
|
|
||||||
python3 -m pip install --upgrade pip
|
|
||||||
|
|
||||||
- name: Get pip cache dir
|
|
||||||
id: pip-cache
|
|
||||||
run: echo "::set-output name=dir::$(pip cache dir)"
|
|
||||||
|
|
||||||
- name: Cache dependencies
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: ${{ steps.pip-cache.outputs.dir }}
|
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements-docs.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-pip-
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: python3 -m pip install -r ./requirements-docs.txt
|
|
||||||
|
|
||||||
- run: mkdocs build
|
|
||||||
|
|
||||||
- name: Deploy
|
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
|
||||||
if: ${{ github.ref == 'refs/heads/main' }}
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
publish_dir: ./site
|
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
mkdocs-material
|
|
||||||
mkdocs-git-revision-date-localized-plugin
|
|
|
@ -6,6 +6,7 @@ endif
|
||||||
## h, help | show this help
|
## h, help | show this help
|
||||||
h help:
|
h help:
|
||||||
$(call py,help_py) || { echo "exiting early!"; exit 1; }
|
$(call py,help_py) || { echo "exiting early!"; exit 1; }
|
||||||
|
.PHONY: _help
|
||||||
_help: export SHOW_HIDDEN=true
|
_help: export SHOW_HIDDEN=true
|
||||||
_help: help
|
_help: help
|
||||||
ifdef PRINT_VARS
|
ifdef PRINT_VARS
|
||||||
|
@ -17,6 +18,7 @@ endif
|
||||||
### | args: -ws --hidden
|
### | args: -ws --hidden
|
||||||
### task.mk builtins: | args: -d --hidden
|
### task.mk builtins: | args: -d --hidden
|
||||||
## _print-ansi | show all possible ansi color code combinations
|
## _print-ansi | show all possible ansi color code combinations
|
||||||
|
.PHONY:
|
||||||
_print-ansi:
|
_print-ansi:
|
||||||
$(call py,print_ansi_py)
|
$(call py,print_ansi_py)
|
||||||
# functions to take f-string literals and pass to python print
|
# functions to take f-string literals and pass to python print
|
||||||
|
@ -27,7 +29,6 @@ tconfirm = $(call py,confirm_py,$(1))
|
||||||
_update-task.mk:
|
_update-task.mk:
|
||||||
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
||||||
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
||||||
.PHONY: h help _help _print-ansi _update-task.mk
|
|
||||||
TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||||
export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST
|
export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST
|
||||||
ifndef INHERIT_SHELL
|
ifndef INHERIT_SHELL
|
||||||
|
|
5
task.mk
5
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.19-21-gb855afa-dev
|
# version: v22.9.19-20-g32110dd
|
||||||
#
|
#
|
||||||
# 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.
|
||||||
|
@ -28,6 +28,7 @@ endif
|
||||||
## h, help | show this help
|
## h, help | show this help
|
||||||
h help:
|
h help:
|
||||||
$(call py,help_py) || { echo "exiting early!"; exit 1; }
|
$(call py,help_py) || { echo "exiting early!"; exit 1; }
|
||||||
|
.PHONY: _help
|
||||||
_help: export SHOW_HIDDEN=true
|
_help: export SHOW_HIDDEN=true
|
||||||
_help: help
|
_help: help
|
||||||
ifdef PRINT_VARS
|
ifdef PRINT_VARS
|
||||||
|
@ -39,6 +40,7 @@ endif
|
||||||
### | args: -ws --hidden
|
### | args: -ws --hidden
|
||||||
### task.mk builtins: | args: -d --hidden
|
### task.mk builtins: | args: -d --hidden
|
||||||
## _print-ansi | show all possible ansi color code combinations
|
## _print-ansi | show all possible ansi color code combinations
|
||||||
|
.PHONY:
|
||||||
_print-ansi:
|
_print-ansi:
|
||||||
$(call py,print_ansi_py)
|
$(call py,print_ansi_py)
|
||||||
# functions to take f-string literals and pass to python print
|
# functions to take f-string literals and pass to python print
|
||||||
|
@ -49,7 +51,6 @@ tconfirm = $(call py,confirm_py,$(1))
|
||||||
_update-task.mk:
|
_update-task.mk:
|
||||||
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
$(call tprint,{a.b_cyan}Updating task.mk{a.end})
|
||||||
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
curl https://raw.githubusercontent.com/daylinmorgan/task.mk/main/task.mk -o .task.mk
|
||||||
.PHONY: h help _help _print-ansi _update-task.mk
|
|
||||||
TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
TASK_MAKEFILE_LIST := $(filter-out $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||||
export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST
|
export MAKEFILE_LIST MAKE TASK_MAKEFILE_LIST
|
||||||
ifndef INHERIT_SHELL
|
ifndef INHERIT_SHELL
|
||||||
|
|
Loading…
Reference in a new issue