diff --git a/Makefile b/Makefile index 0781e1a5..7cf38187 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 75ba3915..20e60aa6 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/bin/ameba.cr b/bin/ameba.cr new file mode 100644 index 00000000..d61d0ff1 --- /dev/null +++ b/bin/ameba.cr @@ -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" diff --git a/shard.yml b/shard.yml index ce32bb3d..b99c242a 100644 --- a/shard.yml +++ b/shard.yml @@ -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