Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (49 loc) · 2.54 KB
/
Copy pathMakefile
File metadata and controls
64 lines (49 loc) · 2.54 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
# Local developer workflow for PersonalPlayerNotes.
#
# Mirrors the checks run in .github/workflows/ci.yml so problems are caught
# before pushing. Requires: lua5.1 (or lua), a local `stylua` binary on PATH
# (or set STYLUA=/path/to/stylua), and luacheck on PATH.
#
# On Windows, run these via Git Bash/WSL, or invoke the equivalent commands
# directly (see README.md / CONTRIBUTING.md). `make dev` is a Windows-friendly
# alias that runs the PowerShell pipeline in Tools/dev.ps1.
LUA ?= lua5.1
STYLUA ?= stylua
LUACHECK ?= luacheck
LUA_FILES := PersonalPlayerNotes.lua PersonalPlayerNotesConfig.lua PersonalPlayerNotesUtils.lua \
ChangelogManifest.lua \
Tests/test_utils.lua Tests/test_config.lua Tests/test_main.lua Tests/support/bootstrap.lua \
Locales/enUS.lua Locales/zhCN.lua Tools/validate-toc.lua \
Tools/generate-changelog-manifest.lua
TEST_FILES := Tests/test_utils.lua Tests/test_config.lua Tests/test_main.lua
.PHONY: format format-check lint test validate changelog changelog-check build check dev clean
format: ## Format all Lua files in-place with StyLua
$(STYLUA) $(LUA_FILES)
format-check: ## Check formatting without writing changes (same as CI)
$(STYLUA) --check $(LUA_FILES)
lint: ## Run Luacheck
$(LUACHECK) .
test: ## Run the pure-Lua unit test suite
@for f in $(TEST_FILES); do \
echo "-- $$f --"; \
$(LUA) $$f || exit 1; \
done
validate: ## Validate PersonalPlayerNotes.toc (metadata, referenced files, duplicates)
$(LUA) Tools/validate-toc.lua
changelog: ## Regenerate ChangelogManifest.lua from changelog.txt
$(LUA) Tools/generate-changelog-manifest.lua
changelog-check: ## Verify ChangelogManifest.lua is up to date (same as CI), no write
$(LUA) Tools/generate-changelog-manifest.lua --check
build: ## Build a local, unsigned addon zip without uploading anywhere (requires BigWigsMods/packager's release.sh in PATH or .release/)
@if [ ! -f .release/release.sh ]; then \
echo "Fetching release.sh from BigWigsMods/packager@v2.5.1..."; \
mkdir -p .release; \
curl -s -o .release/release.sh https://raw.githubusercontent.com/BigWigsMods/packager/v2.5.1/release.sh; \
chmod +x .release/release.sh; \
fi
.release/release.sh -d -p 0 -w 0 -a 0 -m .pkgmeta
check: format-check lint test validate changelog-check ## Run every local check (does not build a package)
dev: ## Run the full local Windows dev pipeline (format, lint, test, validate, changelog-check, build)
powershell -NoProfile -ExecutionPolicy Bypass -File Tools/dev.ps1
clean: ## Remove local build output
rm -rf .release