-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
57 lines (45 loc) · 1.26 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
ARCH := $(shell uname -s | tr '[:upper:]' '[:lower:]')-$(shell uname -m)
RECIPIENT := [email protected]
.PHONY: all lib debug release test
all: tests debug
lib: shard.lock
debug: targets garbage-collect
release: shard.lock $(ARCH) garbage-collect
test: tests
# Test and development tools
# --------------------------
.PHONY: targets
targets: shard.lock
@shards build --progress --debug
.PHONY: tests
tests: shard.lock
./bin/ameba --all
@echo
crystal spec --progress --order rand
shard.lock: shard.yml
@shards install
@shards prune
@touch shard.lock
.PHONY: fixtures
fixtures:
gpg --encrypt --quiet --batch --no-tty \
--recipient $(RECIPIENT) \
--output ./spec/fixtures/encrypted.bin ./spec/fixtures/decrypted.txt
# Build the release
# -----------------
.PHONY: linux-x86_64
linux-x86_64:
@shards --production build --release --no-debug --static --progress
.PHONY: darwin-x86_64
darwin-x86_64:
@shards --production build --release --no-debug --progress
# Remove development artefacts
# ----------------------------
.PHONY: garbage-collect
garbage-collect:
@find . -type f \( -name .DS_Store -o -name "*.dwarf" \) -delete
.PHONY: clean
clean: garbage-collect
@find ./lib -depth 1 -print -delete
@find ./bin -type f -not -name docker -print -delete
@touch shard.yml