-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (24 loc) · 724 Bytes
/
Copy pathMakefile
File metadata and controls
33 lines (24 loc) · 724 Bytes
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
CRYSTAL_VERSION := $(shell sed -ne 's/crystal: //p' shard.yml)
DOCKER_IMAGE := mgiken/crystal:$(CRYSTAL_VERSION)
all: dev
clean:
$(call RUN, rm -rf bin docs)
env:
$(call RUN, crystal version)
$(call RUN, crystal env)
test:
$(call RUN, shards install)
$(call RUN, crystal spec --error-on-warnings)
$(call RUN, crystal tool format --check)
$(call RUN, ameba --all)
watch:
@watchexec -cnr -w src -w spec -w shard.yml -- make --no-print-directory test
dev:
@docker run --rm -it -v $(PWD):/hack:cached -w /hack $(DOCKER_IMAGE) make watch
sh:
@docker run --rm -it -v $(PWD):/hack:cached -w /hack $(DOCKER_IMAGE)
.PHONY: all clean env test watch dev sh
define RUN
@printf "\033[34m%s\033[m " "==>"
$1
endef