-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (38 loc) · 1.6 KB
/
Makefile
File metadata and controls
46 lines (38 loc) · 1.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
SHELL=/bin/bash
VENV_NAME := $(shell [ -d venv ] && echo venv || echo .venv)
# VENV_DIR=${VENV_NAME}
VENV_DIR=.venv
PYTHON=$(shell if [ -d $(VENV_DIR) ]; then echo $(VENV_DIR)/bin/python; else echo python; fi)
ifneq (,$(findstring xterm,${TERM}))
BOLD := $(shell tput -Txterm bold)
RED := $(shell tput -Txterm setaf 1)
GREEN := $(shell tput -Txterm setaf 2)
YELLOW := $(shell tput -Txterm setaf 3)
NORMAL := $(shell tput -Txterm sgr0)
endif
venv:
uv venv -p 3.13.9 --allow-existing
install: venv
@echo "${BOLD}${YELLOW}install:${NORMAL}"
uv sync --frozen --all-extras --all-groups --verbose
build:
@echo "${BOLD}${YELLOW}mkdocs build:${NORMAL}"
# ! mkdocs build needs to get tools folder as module
uv run mkdocs build -s
run:
@echo "${BOLD}${YELLOW}mkdocs serve:${NORMAL}"
uv run mkdocs serve --dirty
reload-oauth:
@echo "${BOLD}${YELLOW}reload oauth animation assets:${NORMAL}"
cp /home/xiang/git/copdips.github.io/docs/javascripts/oauth-evolution.js /home/xiang/git/copdips.github.io/site/javascripts/oauth-evolution.js && cp /home/xiang/git/copdips.github.io/docs/stylesheets/oauth-evolution.css /home/xiang/git/copdips.github.io/site/stylesheets/oauth-evolution.css && python3 /home/xiang/git/copdips.github.io/scripts/reload_page.py
update-venv:
@echo "${BOLD}${YELLOW}update venv:${NORMAL}"
# ${PYTHON} -m pip install -U pip
# uv pip install -Ur requirements.txt
# uv self update for CI, pipx upgrade uv for local
uv self update || pipx upgrade uv
uv lock --upgrade
ci-install:
@echo "${BOLD}${YELLOW}ci-install:${NORMAL}"
uv sync --frozen --verbose
uv pip show mkdocs