Makefile

 1# SPDX-FileCopyrightText: Amolith <amolith@secluded.site>
 2#
 3# SPDX-License-Identifier: CC0-1.0
 4
 5.PHONY: all fmt fmt-check lint check test ci dist clean
 6
 7all: fmt lint check test
 8
 9# Bundle all modules into single distributable file
10dist: dist/wt
11
12dist/wt: src/main.lua $(wildcard src/wt/*.lua) $(wildcard src/wt/cmd/*.lua) scripts/bundle.lua
13	@mkdir -p dist
14	lua scripts/bundle.lua > dist/wt
15	chmod +x dist/wt
16
17clean:
18	rm -rf dist
19
20fmt:
21	lx fmt
22
23fmt-check:
24	lx fmt --check
25
26lint:
27	lx lint
28
29check:
30	lx check
31
32test:
33	lx test
34
35ci: fmt-check lint check test