7279b3c207
Build / Build source distribution (push) Failing after 13s
Build / Execute unit tests (push) Failing after 8s
Build / Verify generated game data is current (push) Failing after 7s
Build / Upload Release Asset (push) Has been skipped
Build / upload_pypi (push) Has been skipped
33 lines
1.0 KiB
Makefile
33 lines
1.0 KiB
Makefile
PYTHON ?= python3
|
|
CACHE ?= .cache/gamedata
|
|
|
|
.PHONY: help gamedata gamedata-check gamedata-force test lint clean-gamedata
|
|
|
|
help:
|
|
@echo 'Targets:'
|
|
@echo ' gamedata regenerate src/static tables from the game dumps'
|
|
@echo ' gamedata-check verify the committed tables are up to date'
|
|
@echo ' test run the unit tests'
|
|
|
|
# Regenerate the shipped lookup tables. Fetches the game dumps first if the
|
|
# cache is missing. Tables land in src/static and should be committed.
|
|
gamedata:
|
|
$(PYTHON) scripts/fetch_gamedata.py --cache $(CACHE)
|
|
$(PYTHON) scripts/gen_gamedata.py --cache $(CACHE)
|
|
|
|
# Regenerate from a fresh checkout of the dumps.
|
|
gamedata-force:
|
|
$(PYTHON) scripts/fetch_gamedata.py --cache $(CACHE) --force
|
|
$(PYTHON) scripts/gen_gamedata.py --cache $(CACHE)
|
|
|
|
# CI guard: fail if the committed tables have drifted from the dumps.
|
|
gamedata-check:
|
|
$(PYTHON) scripts/fetch_gamedata.py --cache $(CACHE)
|
|
$(PYTHON) scripts/gen_gamedata.py --cache $(CACHE) --check
|
|
|
|
test:
|
|
$(PYTHON) -m pytest tests
|
|
|
|
clean-gamedata:
|
|
rm -rf .cache
|