Skip to content

Commit

Permalink
build and copy cli binary in postinstall script
Browse files Browse the repository at this point in the history
  • Loading branch information
repomaa committed Apr 17, 2020
1 parent 217e72d commit 5b671a9
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
/.crystal/
/.shards/
/dev/
/bin/

# Libraries don't need dependency lock
# Dependencies will be locked in application that uses them
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
all:

install: ../../bin/sentry

../../bin/sentry: bin/sentry ../../bin
cp bin/sentry ../../bin/

../../bin:
mkdir -p ../../bin

bin/sentry:
shards build --release sentry

.PHONY: all install bin/sentry
7 changes: 7 additions & 0 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
name: sentry
version: 0.3.1

scripts:
postinstall: make install

targets:
sentry:
main: src/sentry_cli.cr

authors:
- Sam Eaton <[email protected]>
crystal: 0.27.0
Expand Down

0 comments on commit 5b671a9

Please sign in to comment.