1.PHONY : build build-validate ghci test test-rerun test-ghci ghcid ghcid-validate \
2 weeder hlint hlint-watch mod-build
6stack = STACK_YAML='stack.yaml' stack
7ghc_perf_options = --ghc-options '+RTS -A128M -RTS'
8build = build $(ghc_perf_options)
9ghci = ghci $(ghc_perf_options)
10test = test $(ghc_perf_options)
11stack-8.0 = STACK_YAML="stack-8.0.yaml" stack
12stack-8.2 = STACK_YAML="stack-8.2.yaml" stack
13stack-8.4 = STACK_YAML="stack-8.4.yaml" stack
14stack-8.6 = STACK_YAML="stack-8.6.yaml" stack
15elasticsearch_directory = elasticsearch
17# stack build --ghc-options '+RTS -A128M -RTS'
23## build with validation options (Wall, Werror)
25 $(stack) build --fast --ghc-options '-Wall -Werror +RTS -A128M -RTS'
35## run tests with forced re-run via "-r"
37 $(stack) $(test) --test-arguments "-r"
39## run ghci with test stanza
41 $(stack) $(ghci) bloodhound:test:bloodhound-tests
45 ghcid -c "$(stack) ghci bloodhound:lib --test --ghci-options='-fobject-code -fno-warn-unused-do-bind' --main-is bloodhound:test:bloodhound-tests"
47## run ghcid with validate options (Werror, etc.)
49 ghcid -c "$(stack) ghci bloodhound:lib --test --ghci-options='-Werror -fobject-code -fno-warn-unused-do-bind' --main-is bloodhound:test:bloodhound-tests"
59## hlint watch with `sos`
61 sos src/ -c "hlint ." -p "src/(.*)\.hs"
64# stack build --ghc-options '+RTS -A128M -RTS'
67 @echo "Make certain you have an elasticsearch instance on localhost:9200 !"
69## Test with GHC 8.0 and ES 5.x
71 STACK_YAML="stack-8.0.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500"
73## Test with GHC 8.2 and ES 5.x
75 STACK_YAML="stack.yaml" stack test --fast bloodhound:test:bloodhound-tests --test-arguments="--qc-max-success 500"
77## Build with the GHC 8.0 Stack YAML
81## Build with the GHC 8.2 Stack YAML
85## Build with the GHC 8.4 Stack YAML
89## Build with the GHC 8.6 Stack YAML
93## Upload the package to Hackage
95 stack upload --no-signature .
99## Run test environment
101 @LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f docker-compose.yml --project-directory $(elasticsearch_directory) up
103## Run test environment in detach mode
104compose-ES5-detach-up:
105 @LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f docker-compose.yml --project-directory $(elasticsearch_directory) up -d
107## Close test environment if run on detach mode
108compose-ES5-detach-down:
109 @LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f docker-compose.yml --project-directory $(elasticsearch_directory) down
111## build the docker compose images
113 @LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f docker-compose.yml --project-directory $(elasticsearch_directory) build
115## Spawn bash shell in ES5 test container
117 @LOCAL_USER_ID=${LOCAL_USER_ID} docker-compose -f docker-compose.yml --project-directory $(elasticsearch_directory) exec elasticsearch1 bash
120 @echo "Please use \`make <target>' where <target> is one of\n\n"
121 @awk '/^[a-zA-Z\-\_0-9]+:/ { \
122 helpMessage = match(lastLine, /^## (.*)/); \
124 helpCommand = substr($$1, 0, index($$1, ":")); \
125 helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
126 printf "%-30s %s\n", helpCommand, helpMessage; \
129 { lastLine = $$0 }' $(MAKEFILE_LIST)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list