Files
arti-pack/Makefile
T
unkin-agent 46517953e5
ci/woodpecker/pr/lint Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pr/pre-commit Pipeline was successful
Add arti-pack plugin manager scaffold
- add lua modules for spec parsing, lock state, fs helpers and the installer
- add ArtiPackSync/ArtiPackClean/ArtiPackList commands and help doc
- add headless nvim test harness and specs
- add make test/lint/fmt/pre-commit and patch/minor/major bump targets
- add woodpecker test, lint and pre-commit pipelines
2026-09-08 23:22:15 +10:00

37 lines
1.1 KiB
Makefile

.PHONY: test lint fmt pre-commit patch minor major _tag
test:
nvim --headless -l tests/run.lua
lint:
luacheck lua tests
fmt:
stylua lua tests
pre-commit:
@uvx pre-commit run --all-files
# Bump helpers — read the latest semver tag and create the next one.
# If no tag exists yet, start from v0.0.0.
_LATEST = $(shell git tag --sort=-v:refname | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+$$' | head -1)
_BASE = $(if $(_LATEST),$(_LATEST),v0.0.0)
_MAJ = $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f1)
_MIN = $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f2)
_PAT = $(shell echo $(_BASE) | sed 's/^v//' | cut -d. -f3)
patch:
@NEW=v$(_MAJ).$(_MIN).$(shell expr $(_PAT) + 1); \
git tag -a $$NEW -m "Release $$NEW" && echo "Tagged $$NEW" && $(MAKE) _tag TAG=$$NEW
minor:
@NEW=v$(_MAJ).$(shell expr $(_MIN) + 1).0; \
git tag -a $$NEW -m "Release $$NEW" && echo "Tagged $$NEW" && $(MAKE) _tag TAG=$$NEW
major:
@NEW=v$(shell expr $(_MAJ) + 1).0.0; \
git tag -a $$NEW -m "Release $$NEW" && echo "Tagged $$NEW" && $(MAKE) _tag TAG=$$NEW
_tag:
git push origin $(TAG)