aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: fc506f2985ea16136c279eedf87b8118ab5559da (plain) (blame)
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
STACK_ROOT ?= "${HOME}/.stack"

build:
	stack --stack-root "${STACK_ROOT}" build

test:
	stack --stack-root "${STACK_ROOT}" test

lint: lint-haskell lint-shell

lint-haskell:
	$(MAKE) -C core lint
	$(MAKE) -C scaffolder lint
	$(MAKE) -C specification lint

lint-shell:
	@git ls-files "*.sh" | xargs shellcheck -x

doc: ## make doc # Use haddock for producing the codebase documentation
	stack --no-haddock-deps --stack-root "${STACK_ROOT}" haddock

doc-publish: doc ## make doc-publish # Build and publish generated haddock
	./scripts/documentation-versioning.sh "${WWW}" "${COMMIT_TAG}" '$(shell stack --stack-root "${STACK_ROOT}" path --local-doc-root)'

help:
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.DEFAULT_GOAL := help
.PHONY: test lint doc help