From 8fd74be9be2f8519319edbc14a99af45ba43d7d3 Mon Sep 17 00:00:00 2001 From: Dirk Heilig Date: Thu, 18 Jan 2024 14:33:52 +0100 Subject: [PATCH] add makefile --- .gitignore | 1 + Makefile | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 Makefile diff --git a/.gitignore b/.gitignore index 86c95ef..7040212 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ hugo.linux # Temporary lock file while building /.hugo_build.lock +dist diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..c45c2e6 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +.PHONY: build minify clean release deploy_test + + +release: build minify + +build: clean + hugo --gc --minify --cleanDestinationDir + +clean: + rm -rf public dist + +minify: dist build + minify -a -r -o dist/ public/. -q --exclude "public/js/jquery-3.7.1.min.js" + cp -rp public/js/jquery-3.7.1.min.js dist/public/js/jquery-3.7.1.min.js + mv dist/public/* dist/ + rm -rf dist/public + +dist: + mkdir dist + +deploy_test: release + rsync -rv --delete dist/* shnbk.de:domains/c3retest.shnbk.de/htdocs \ No newline at end of file