From 5dd59eb461e6d4659bec4c40c93bc865e0722a50 Mon Sep 17 00:00:00 2001 From: Alexander Willner Date: Sun, 12 Apr 2020 21:55:55 +0200 Subject: [PATCH] optimizing images --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 5f388ab..fd6d087 100644 --- a/Makefile +++ b/Makefile @@ -151,7 +151,7 @@ deps-install: feedback: @open https://github.com/AlexanderWillner/KanbanView/issues -pre-commit: +pre-commit: png jpg @make kill-api @make deps-install install uninstall clean test auto-style @THINGSDB=tests/Things.sqlite3 make run-api & @@ -160,6 +160,16 @@ pre-commit: @open dist/KanbanView.app @git status +png: + @type optipng >/dev/null 2>&1 || (echo "Run 'brew install optipng' first." >&2 ; exit 1) + @echo "Optimizing PNG..." + @find . -iname "*.png" -exec optipng -silent {} \; + +jpg: + @type jpegoptim >/dev/null 2>&1 || (echo "Run 'brew install jpegoptim' first." >&2 ; exit 1) + @echo "Optimizing JPG..." + @find . -iname "*.jpg" -exec jpegoptim -q {} \; + upload: clean @python3 setup.py sdist bdist_wheel @python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/things3*