Let it be extensible (#112)

This commit is contained in:
Vitalii Elenhaupt 2019-07-18 13:53:04 +03:00 committed by GitHub
parent b868d88a85
commit 276fc4409f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 2 deletions

View file

@ -14,6 +14,8 @@ install: build
bin: build
mkdir -p $(SHARD_BIN)
cp ./bin/ameba $(SHARD_BIN)
run_file:
cp -r ./bin/ameba.cr $(SHARD_BIN)
test: build
$(CRYSTAL_BIN) spec
./bin/ameba --all

View file

@ -73,7 +73,7 @@ install:
- shards install
script:
- crystal spec
- bin/ameba
- crystal bin/ameba.cr
```
Using this config Ameba will inspect files just after the specs run. Travis will also fail

7
bin/ameba.cr Normal file
View file

@ -0,0 +1,7 @@
# Require ameba cli which starts the inspection.
require "ameba/cli"
# Require ameba extensions here which are added as project dependencies.
# Example:
#
# require "ameba-performance"

View file

@ -11,7 +11,8 @@ targets:
main: src/cli.cr
scripts:
postinstall: make bin
# TODO: remove pre-compiled executable in future releases
postinstall: make bin && make run_file
executables:
- ameba