mirror of
https://gitea.invidious.io/iv-org/shard-radix.git
synced 2024-08-15 00:43:21 +00:00
905bd9e14b
Allow usage of `make spec` to run project's specs against default Crystal compiler or one that can be supplied with `CRYSTAL` environment variable. Also provide ways to run in automated mode thanks to watchexec. [skip ci]
18 lines
No EOL
471 B
Makefile
18 lines
No EOL
471 B
Makefile
CRYSTAL ?= crystal
|
|
|
|
profile ?= ## Display profiling information after specs execution
|
|
verbose ?= ## Run specs in verbose mode
|
|
|
|
SPEC_FLAGS := $(if $(profile),--profile )$(if $(verbose),--verbose )
|
|
|
|
.PHONY: default autospec spec
|
|
|
|
default: spec
|
|
|
|
# `autospec` task uses `watchexec` external dependency:
|
|
# https://github.com/mattgreen/watchexec
|
|
autospec:
|
|
watchexec --exts cr --watch spec --watch src --clear $(CRYSTAL) spec $(SPEC_FLAGS)
|
|
|
|
spec:
|
|
$(CRYSTAL) spec $(SPEC_FLAGS)
|