-
-
Notifications
You must be signed in to change notification settings - Fork 53
/
Makefile
65 lines (49 loc) · 1.44 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
default: b
c:
cabal clean
b:
cabal build --enable-tests all --ghc-options="-fwrite-ide-info"
rb: c b
l:
hlint .
hlint-fix:
hlint --refactor --refactor-options="--inplace" .
doc: b
cabal haddock all
dist: rb
cabal sdist all
format-cabal:
cabal-fmt -i hoauth2/hoauth2.cabal
cabal-fmt -i hoauth2-tutorial/hoauth2-tutorial.cabal
cabal-fmt -i hoauth2-providers/hoauth2-providers.cabal
cabal-fmt -i hoauth2-providers-tutorial/hoauth2-providers-tutorial.cabal
cabal-fmt -i hoauth2-demo/hoauth2-demo.cabal
## TODO: can run directly from cli but 'make format'
format-hs:
# no luck either: fourmolu -i "$$(fd -e hs)"
fourmolu -i $(fd -e hs)
## install ghcid globally: `cabal install ghcid`
watch-lib:
ghcid --command="cabal repl hoauth2" --restart=hoauth2/hoauth2.cabal
publish: dist
cabal upload $(echo ./dist-newstyle/sdist/*.tar.gz)
####################
### CI - nix build
####################
ci: rb l
cabal test all
###############################################################################
# HIEDB #
###############################################################################
clean-hindex:
rm -f .hiedb
mk-hindex:
hiedb -D .hiedb index dist-newstyle/
#
# mk-html:
# hiedb -D .hiedb html t:GrantTypeFlow:Network.OAuth2.Experiment.Types:hoauth2-2.5.0-inplace
#
# mk-graph:
# hiedb index -D .hiedb
# hiedb ref-graph -D .hiedb
# dot -Tsvg refs.dot > /tmp/hoauth2.svg