21 lines
620 B
Makefile
21 lines
620 B
Makefile
SHELL := /bin/bash
|
|
.DEFAULT_GOAL := help
|
|
PYTHON := .venv/bin/python
|
|
.PHONY: help install build test serve deploy
|
|
help:
|
|
@echo 'make install | build | test | serve | deploy'
|
|
@echo '文章: content/posts/*.md;应用: apps.json;样式: assets/site.css'
|
|
install: .venv/.installed
|
|
.venv/.installed: requirements.txt
|
|
uv venv --allow-existing .venv
|
|
uv pip install --python $(PYTHON) -r requirements.txt
|
|
touch $@
|
|
build: install
|
|
$(PYTHON) build.py
|
|
test: install
|
|
$(PYTHON) -m unittest discover -s tests -v
|
|
serve: build
|
|
$(PYTHON) -m http.server 4176 --bind 127.0.0.1 --directory public
|
|
deploy: test
|
|
$(PYTHON) deploy.py
|