-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
48 lines (36 loc) · 1.36 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
all:
@echo Available tasks:
@echo make card-update '# Download the latest Scryfall JSON dump and generate a new data/all_cards.landlord'
@echo make arena '# Generate arena id to scryfall id associations'
@echo make net-decks '# Scrape the latest net decks from MTG Goldfish and generate a new data/net_decks.landlord'
@echo make test '# Run cargo test'
@echo make clean '# Run cargo clean'
@echo make check '# Run cargo check'
@echo make build '# Builds wasm package in ./lib/pkg'
@echo make publish '# Publishes the wasm package in ./lib/pkg to npm'
@echo make deploy '# Builds and publishes the wasm package in ./lib/pkg to npm'
card-update:
./bins/card-update.sh
net-decks:
RUST_LOG=info cargo run --release --bin mtggoldfish2landlord data/net_decks.landlord
arena:
RUST_LOG=info cargo run --release --bin arena2scryfall
install-wasm-pack:
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
check:
cargo check
clean:
cargo clean
test:
cargo test --all
bench:
cargo bench
build:
# Copy top-level docs into lib for wasm-pack to bundle
cp ./LICENSE ./lib
cp ./README.md ./lib
wasm-pack build lib --scope=mtgoncurve --release
publish:
wasm-pack publish lib --access=public
deploy: build publish
.PHONY: all card-update arena net-decks install-wasm-pack check clean test bench build publish deploy