-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
28 lines (23 loc) · 887 Bytes
/
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
# cargo allows us to hook early in the build process but not after the binary's
# compilation, so we need to supply our own build scripting with something, in
# this case I've chosen a Makefile.
no_arg:
@echo "you probably want 'make build' or 'make test'"
@false
build:
cargo build --quiet
cargo build --quiet --release
sed -e "s/{RADIX_CALC_README}/$$(grep '^version =' Cargo.toml)/" alfred/info.plist.in > alfred/info.plist
zip -q -j alfred/radix-calc.alfredworkflow \
alfred/info.plist \
alfred/1B5B938D-D584-4467-BBB3-9C41F6C212F6.png \
alfred/EE844101-D6F4-4115-86FB-8440E16E266C.png \
alfred/icons/*.png \
target/release/radix-calc
test: build
cargo test --quiet -- --quiet
cargo test --quiet --release -- --quiet
PATH=`pwd`/target/release:`pwd`/tests/bats:$$PATH ./tests/test-binary.bats
clean:
cargo clean
.PHONY: no_arg build test clean