Skip to content

Commit 3b1a58a

Browse files
committed
build and copy cli binary in postinstall script
1 parent 24002a1 commit 3b1a58a

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
/.crystal/
55
/.shards/
66
/dev/
7+
/bin/
78

89
# Libraries don't need dependency lock
910
# Dependencies will be locked in application that uses them

Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
all:
2+
3+
install: ../../bin/sentry
4+
5+
../../bin/sentry: bin/sentry ../../bin
6+
cp bin/sentry ../../bin/
7+
8+
../../bin:
9+
mkdir -p ../../bin
10+
11+
bin/sentry:
12+
shards build --release sentry
13+
14+
.PHONY: all install bin/sentry

shard.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
name: sentry
22
version: 0.3.1
33

4+
scripts:
5+
postinstall: make install
6+
7+
targets:
8+
sentry:
9+
main: src/sentry_cli.cr
10+
411
authors:
512
- Sam Eaton <sam@eaton.party>
613
crystal: 0.27.0

0 commit comments

Comments
 (0)