Add CI.md with local CI docs, update Makefile with ci target

This commit is contained in:
2026-06-20 15:17:42 -03:00
parent 82b0d84fec
commit 51ddececeb
2 changed files with 51 additions and 2 deletions
+18 -2
View File
@@ -1,7 +1,7 @@
.PHONY: lint test build clean
.PHONY: lint test build clean ci
lint:
shellcheck unleash lib/*.sh
shellcheck unleash lib/*.sh 2>/dev/null || brew install shellcheck && shellcheck unleash lib/*.sh
bash -n unleash lib/*.sh
test:
@@ -12,3 +12,19 @@ build:
clean:
rm -f unleash-standalone.sh
ci:
@echo "=== ShellCheck ===" && \
for f in unleash lib/*.sh examples/*.sh; do \
[ -f "$$f" ] || continue; \
echo " $$f"; shellcheck -S warning "$$f" || fail=1; \
done && \
echo "=== Bash Syntax ===" && \
for f in unleash lib/*.sh examples/*.sh; do \
[ -f "$$f" ] || continue; \
bash -n "$$f" || fail=1; \
done && \
echo "=== Markdown ===" && \
npx markdownlint-cli '*.md' || true && \
echo "=== All checks done ===" && \
[ -z "$$fail" ] || exit 1