1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 21:02:09 +00:00

Make: skip gzip-static, add check-links to test

- Don't compress build assets unless we're building for deployment
- Inclue link-checking in "make test"
This commit is contained in:
rohan kumar 2020-12-15 23:16:01 -08:00
parent 3368f8fea9
commit 6ac7e6d3a8
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -23,16 +23,16 @@ lint-css:
stylelint $(CSS_DIR)/main.css $(CSS_DIR)/dark.css $(CSS_DIR)/narrow.css stylelint $(CSS_DIR)/main.css $(CSS_DIR)/dark.css $(CSS_DIR)/narrow.css
csslint $(CSS_DIR) csslint $(CSS_DIR)
lint: lint-css build .hintrc-local lint: lint-css hugo .hintrc-local
hint --config .hintrc-local -f codeframe $(OUTPUT_DIR) hint --config .hintrc-local -f codeframe $(OUTPUT_DIR)
check-links: build check-links: hugo
lychee --verbose $(find public -type f -name '*.html' -o -name '*.gmi' -o -name '*.txt') lychee --verbose $(find public -type f -name '*.html' -o -name '*.gmi' -o -name '*.txt')
test: lint test: lint check-links
hugo: hugo:
hugo hugo --gc
build: hugo build: hugo
# gzip_static + max zopfli compression # gzip_static + max zopfli compression
@ -48,6 +48,6 @@ deploy: build
rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/publickey.txt $(GEMINI_RSYNC_DEST)/ --delete rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/publickey.txt $(GEMINI_RSYNC_DEST)/ --delete
rsync $(RSYNCFLAGS) $(OUTPUT_DIR)/posts/gemini.xml $(GEMINI_RSYNC_DEST)/feed.xml rsync $(RSYNCFLAGS) $(OUTPUT_DIR)/posts/gemini.xml $(GEMINI_RSYNC_DEST)/feed.xml
all: clean lint deploy all: clean test deploy
.PHONY: clean lint-css test lint build deploy all .PHONY: clean lint-css lint check-links test hugo build deploy all