File tree Expand file tree Collapse file tree 2 files changed +36
-5
lines changed
Expand file tree Collapse file tree 2 files changed +36
-5
lines changed Original file line number Diff line number Diff line change 1010
1111# mkdocs documentation
1212/site
13+ build
1314
1415# mypy
1516.mypy_cache /
Original file line number Diff line number Diff line change 1- build :
2- python -m build
1+ BUILD_DIR = build
2+ SITE_DIR = $(BUILD_DIR ) /site
3+ FETCH_DIR = $(BUILD_DIR ) /fetched
4+ PACKAGE_DIR = $(BUILD_DIR ) /package
35
4- docs :
5- mkdocs build
6+ # From: https://github.com/IllustratedMan-code/make-help
7+ help : # # Show this help
8+ @sed -ne " s/^##\(.*\)/\1/p" $(MAKEFILE_LIST )
9+ @printf " ────────────────────────` tput bold` ` tput setaf 2` pulp-docs commands ` tput sgr0` ───────────────────────────\n"
10+ @sed -ne " /@sed/!s/\(^[^#?=]*:\).*##\(.*\)/` tput setaf 2` ` tput bold` \1` tput sgr0` \2/p" $(MAKEFILE_LIST )
11+ @printf " ───────────────────────────────────────────────────────────────────────\n"
612
7- .PHONY : docs build
13+ clean : # # Clean the package and docs build artifacts
14+ rm -rf $(BUILD_DIR )
15+
16+ ci : # # Run the component CI workflow. E.g: make ci component=pulp_rpm
17+ ifndef component
18+ $(error component is a required argument. Usage: make ci component=<your-component-name>)
19+ endif
20+ @echo "Running CI for component=$(component)"
21+ @mkdir -p $(BUILD_DIR)
22+ pulp-docs fetch --dest $(FETCH_DIR)
23+ pulp-docs build --site-dir $(BUILD_DIR)/site-$(component) --path $(component)@..:$(FETCH_DIR)
24+ @echo "Built site at: $(BUILD_DIR)/site-$(component)"
25+
26+ docs : # # Build the production ready documentation
27+ @mkdir -p $(BUILD_DIR )
28+ pulp-docs fetch --dest $(FETCH_DIR )
29+ pulp-docs build --site-dir $(SITE_DIR ) --path $(FETCH_DIR )
30+ @echo " Built site at: $( SITE_DIR) "
31+
32+ build : # # Build the pulp-docs package
33+ @mkdir -p $(BUILD_DIR )
34+ python -m build -o $(PACKAGE_DIR )
35+
36+ .PHONY : clean ci build help docs
37+ .DEFAULT_GOAL := help
You can’t perform that action at this time.
0 commit comments