Install binary to shard/bin folder

Just a workaround before https://github.com/crystal-lang/shards/pull/126
becomes live.
This commit is contained in:
Vitalii Elenhaupt 2017-11-16 10:18:11 +02:00
parent 7546a80f1c
commit 6a28e21162
No known key found for this signature in database
GPG key ID: 7558EF3A4056C706
3 changed files with 18 additions and 2 deletions

View file

@ -1,5 +1,6 @@
CRYSTAL_BIN ?= $(shell which crystal)
PREFIX ?= /usr/local
SHARD_BIN ?= ../../bin
build:
$(CRYSTAL_BIN) build --release --no-debug -o bin/ameba src/cli.cr $(CRFLAGS)
@ -8,6 +9,9 @@ clean:
install: build
mkdir -p $(PREFIX)/bin
cp ./bin/ameba $(PREFIX)/bin
bin: build
mkdir -p $(SHARD_BIN)
cp ./bin/ameba $(SHARD_BIN)
test: build
$(CRYSTAL_BIN) spec
./bin/ameba

View file

@ -37,7 +37,18 @@ development_dependencies:
github: veelenga/ameba
```
Compile and install `ameba` binary onto your system while running `crystal deps`.
Build `bin/ameba` binary within your project directory while running `crystal deps`.
You may want also use it on [Travis](travis-ci.org):
```yaml
language: crystal
install:
- crystal deps
script:
- crystal spec
- bin/ameba
```
### OS X

View file

@ -7,7 +7,8 @@ authors:
- Vitalii Elenhaupt <velenhaupt@gmail.com>
scripts:
postinstall: make build
postinstall: make bin
# https://github.com/crystal-lang/shards/pull/126
executables:
- ameba