This repository has been archived on 2024-02-04. You can view files and clone it, but cannot push or open issues or pull requests.
blog.polynom.me/Makefile

52 lines
1.3 KiB
Makefile
Raw Normal View History

2020-09-21 15:49:58 +00:00
BUILD_DATE := $(shell date '+%H:%M %d.%m.%Y')
RAW_IMAGES := $(wildcard assets/img/raw/*.jpg)
OPTIMIZED_IMAGES := $(foreach img,${RAW_IMAGES},assets/img/$(notdir ${img}))
${OPTIMIZED_IMAGES}: ${RAW_IMAGES}
for file in ${RAW_IMAGES} ; do \
2020-03-25 21:31:01 +00:00
basename=`basename $$file`; \
2020-09-21 15:49:58 +00:00
convert \
assets/img/raw/$$basename \
-sampling-factor 4:2:0 \
-strip \
-quality 75 \
-interlace JPEG \
-colorspace RGB \
assets/img/$$basename ; \
2020-03-25 21:31:01 +00:00
done
2020-09-21 15:49:58 +00:00
serve: ${OPTIMIZED_IMAGES}
python ../shared-assets/makesite.py \
-p params.json \
-v page_assets=/assets \
-v build_time="${BUILD_DATE}" \
--assets ../shared-assets/assets \
--assets ./assets \
--copy-assets \
--ignore ../shared-assets/assets/img \
--ignore assets/img/raw \
--include robots.txt \
--blog \
--rss
cd _site/ && python -m http.server 8080
2020-03-25 21:31:01 +00:00
2020-09-21 15:49:58 +00:00
build: ${OPTIMIZED_IMAGES}
python ../shared-assets/makesite.py \
-p params.json \
-v page_assets=https://cdn.polynom.me \
-v build_time="${BUILD_DATE}" \
--assets ./assets \
--copy-assets \
--ignore assets/img/raw \
--include robots.txt \
--blog \
--rss
python ../shared-assets/pgp-sign.py $(wildcard _site/*.html)
gpg \
--armor \
--output _site/assets/files/verify.sh.sig \
--local-user papatutuwawa@polynom.me \
--detach-sign \
assets/files/verify.sh
2020-09-21 15:49:58 +00:00
tar -czf blog.tar.gz _site