-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
70 lines (59 loc) · 1.64 KB
/
Copy pathMakefile
File metadata and controls
70 lines (59 loc) · 1.64 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
sources = src tests
default: help
.PHONY: help
# TODO: Look into ways to automatically gather output for this command.
# The struggle is that Windows Terminal doesn't have `grep`; and vice-versa windows grep-like tools won't work for linux
help: # Help
@echo IreBot Makefile
@echo ---------------
@echo * make setup: Setup the repository - recommended to use right after cloning
@echo * make sync: Install dependencies
@echo * make update: Update dependencies
@echo * make run: Run the bot
@echo * make lint: Run the linter
@echo * make format: Format the code
@echo * make format-check: Check code formatting
@echo * make tests: Run the tests
@echo * make pages: Locally run the github pages website
.PHONY: setup
.SILENT: setup
setup: # Setup the repository - recommended to use right after cloning
uv sync
prek install
.PHONY: sync
.SILENT: sync
sync: # Install dependencies
uv sync
.PHONY: update
.SILENT: update
update: # Update dependencies
uv lock --upgrade
uv sync
prek autoupdate
.PHONY: run
.SILENT: run
run: # Run the bot
uv run src/main.py
.PHONY: lint
.SILENT: lint
lint: # Run the linter
uv run ruff check $(sources)
uv run ruff format --check $(sources)
.PHONY: format
.SILENT: format
format: # Format the code
uv run ruff check $(sources) --fix
uv run ruff format $(sources)
.PHONY: format-check
.SILENT: format-check
format-check: # Check code formatting
uv run ruff format --check $(sources)
.PHONY: tests
.SILENT: tests
tests: # Run the tests
uv run pytest
.PHONY: pages
.SILENT: pages
pages: # Run the pages
cd docs && \
bundle exec jekyll serve