Tool improvements

This commit is contained in:
Anton Vakhrushev
2019-10-14 18:11:28 +03:00
parent a7249a875a
commit b63c00cea4
6 changed files with 16 additions and 24 deletions

View File

@ -1,3 +1,4 @@
PATH := tools:$(PATH)
APP_NAME := expansion
ENTRY_POINT = ./src/$(APP_NAME).cr
@ -12,17 +13,20 @@ install: build-docker
.PHONY: build
build:
mkdir -p build
./crystal build $(ENTRY_POINT) --release --no-debug --static -o build/$(APP_NAME)
crystal build $(ENTRY_POINT) --release --no-debug --static -o build/$(APP_NAME)
.PHONY: format
format:
./crystal tool format ./src ./spec
crystal tool format ./src ./spec
.PHONY: run
run: format
./crystal run $(ENTRY_POINT)
crystal run $(ENTRY_POINT)
.PHONY: spec
spec: format
./crystal spec --warnings all --error-on-warnings --error-trace
crystal spec --warnings all --error-on-warnings --error-trace
.PHONY: ameba
ameba:
ameba src/ || true