From 6a28e211623821c8142f4dcaa0d2085449f223a4 Mon Sep 17 00:00:00 2001 From: Vitalii Elenhaupt Date: Thu, 16 Nov 2017 10:18:11 +0200 Subject: [PATCH] Install binary to shard/bin folder Just a workaround before https://github.com/crystal-lang/shards/pull/126 becomes live. --- Makefile | 4 ++++ README.md | 13 ++++++++++++- shard.yml | 3 ++- 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 4ebd64aca..d95adcbee 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 39000b2e3..81b8a11b3 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/shard.yml b/shard.yml index fa3d1ba99..eddf7f4c9 100644 --- a/shard.yml +++ b/shard.yml @@ -7,7 +7,8 @@ authors: - Vitalii Elenhaupt scripts: - postinstall: make build + postinstall: make bin +# https://github.com/crystal-lang/shards/pull/126 executables: - ameba