on 0.5.0.0 help sign in
docker-hs/Makefile
42 lines 1.1 kB history raw
1.PHONY: build repl test release help
3.DEFAULT_GOAL = help
5PROJECT_NAME ?= $(shell grep "^name" docker.cabal | cut -d " " -f17)
6VERSION ?= $(shell grep "^version:" docker.cabal | cut -d " " -f14)
7RESOLVER ?= $(shell grep "^resolver:" stack.yaml | cut -d " " -f2)
8GHC_VERSION ?= $(shell stack ghc -- --version | cut -d " " -f8)
9ARCH=$(shell uname -m)
11## Run build
12build:
13 @stack build
15## Run repl
16repl:
17 @stack repl
19## Run tests. Example RUN_INTEGRATION_TESTS=1 make test
20test:
21 @RUN_INTEGRATION_TESTS=1 stack test
23## Cut new release
24release:
25 @stack build --haddock
26 @stack sdist
27 @echo "\n\nDone. Now run: \n\nstack upload <path_to_tarball>\n"
28 @echo "\nAnd: \n\ngit tag ${VERSION} && git push --tags\n"
30## Show help screen.
31help:
32 @echo "Please use \`make <target>' where <target> is one of\n\n"
33 @awk '/^[a-zA-Z\-\_0-9]+:/ { \
34 helpMessage = match(lastLine, /^## (.*)/); \
35 if (helpMessage) { \
36 helpCommand = substr($$1, 0, index($$1, ":")-1); \
37 helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
38 printf "%-30s %s\n", helpCommand, helpMessage; \
39 } \
40 } \
41 { lastLine = $$0 }' $(MAKEFILE_LIST)