-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
35 lines (27 loc) · 1013 Bytes
/
Makefile
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
# This Makefile attempts to follow the best-practice set out by Alexis King
# in "An opinionated guide to Haskell in 2018" where we build developer tooling
# as part of the project environment rather than globally. This ensures that
# tools like `ghcmod` are using the same version of GHC as our target runtime to
# get the most relevant results.
#
# https://lexi-lambda.github.io/blog/2018/02/10/an-opinionated-guide-to-haskell-in-2018/
clean:
@stack clean
FIND_CMD=fd
# This should only need to be done once per developer machine.
setup: clean
stack build --no-docker --copy-compiler-tool stylish-haskell hlint apply-refact
_HLINT=hlint {} \;
hlint:
@fd -e hs . src -x $(_HLINT)
_STYLISH=stylish-haskell -i {} \;
stylish-haskell:
@fd -e hs . src -x $(_STYLISH)
_BRITTANY=brittany --write-mode=inplace {} \;
brittany:
@fd -e hs . src -x $(_BRITTANY)
lint-all: stylish-haskell brittany hlint
test:
@stack test --test-arguments "--color always"
deploy: clean
@stack build --copy-bins && ./deploy.sh