From 784cfa9f5babe1ec4914de9988ace9d6621acffe Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Wed, 15 Jun 2022 13:38:45 -0500 Subject: [PATCH] chore: add recipes to makefile --- Makefile | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index f7cfeb1..4f0b63a 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,7 @@ SRC_FILES = $(wildcard yartsu/*) -.PHONY: list lint build svg-docs theme-docs docs typing format +.PHONY: list lint build svg-docs theme-docs docs typing format dist check-tag + lint: format typing typing: @@ -9,6 +10,19 @@ typing: format: pdm run pre-commit run --all +check-tag: + @[ "${TAG}" ] || ( echo ">> TAG is not set"; exit 1 ) + @git describe HEAD --tags --exact-match + +release: build/yartsu check-tag + gh release create $(TAG) build/yartsu -p -d + +publish: dist + twine upload dist/* + +dist: + pdm build + build: build/yartsu build/yartsu: $(SRC_FILES) @@ -39,6 +53,8 @@ demo-docs: console.print('\n:snake: [b i]Emoji\'s!'); \ console.print(' [cyan]Nerd Fonts!');" \ | yartsu -w 25 -o assets/demo.svg +clean: + rm -rf build dist # https://stackoverflow.com/a/26339924 list: