-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
justfile
86 lines (68 loc) Β· 2.07 KB
/
justfile
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
ci: clippy forbid
cargo fmt -- --check
cargo test -- --test-threads=1
forbid:
./bin/forbid
fmt:
cargo fmt
clippy:
cargo clippy --all --all-targets
bench:
cargo criterion
watch +args='test':
cargo watch --clear --exec '{{args}}'
install-dev-deps:
cargo install cargo-criterion
deploy branch chain domain:
ssh root@{{domain}} "mkdir -p deploy \
&& apt-get update --yes \
&& apt-get upgrade --yes \
&& apt-get install --yes git rsync"
rsync -avz deploy/checkout root@{{domain}}:deploy/checkout
ssh root@{{domain}} 'cd deploy && ./checkout {{branch}} {{chain}} {{domain}}'
deploy-signet branch="master": (deploy branch "signet" "signet.ordinals.com")
log unit chain="signet" domain="signet.ordinals.com":
ssh root@{{domain}} 'journalctl -fu {{unit}}@{{chain}}'
test-deploy:
ssh-keygen -f ~/.ssh/known_hosts -R 192.168.56.4
vagrant up
ssh-keyscan 192.168.56.4 >> ~/.ssh/known_hosts
rsync -avz \
--delete \
--exclude .git \
--exclude target \
--exclude .vagrant \
--exclude index.redb \
. root@192.168.56.4:ord
ssh root@192.168.56.4 'cd ord && ./deploy/setup'
status:
ssh root@65.108.68.37 systemctl status bitcoind
ssh root@65.108.68.37 systemctl status ord
open:
open http://localhost
generate-private-key:
cargo run generate-private-key
generate-paper-wallets:
cat private-keys.txt | cargo run generate-paper-wallets
print-paper-wallet path:
wkhtmltopdf -L 25mm -R 25mm -T 50mm -B 25mm {{path}} wallet.pdf
lp -o sides=two-sided-long-edge wallet.pdf
doc:
cargo doc --all --open
# publish current GitHub master branch
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
git clone git@github.com:casey/ord.git tmp/release
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
cd tmp/release
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
cd ../..
rm -rf tmp/release
update-modern-normalize:
curl \
https://raw.githubusercontent.com/sindresorhus/modern-normalize/main/modern-normalize.css \
> static/modern-normalize.css