forked from ordinals/ord
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
122 lines (95 loc) Β· 3 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
set positional-arguments
watch +args='test':
cargo watch --clear --exec '{{args}}'
ci: clippy forbid
cargo fmt -- --check
cargo test --all
forbid:
./bin/forbid
fmt:
cargo fmt
clippy:
cargo clippy --all --all-targets
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-mainnet: (deploy "master" "main" "ordinals.com")
deploy-signet branch="master": (deploy branch "signet" "signet.ordinals.com")
log unit="ord" domain="ordinals.com":
ssh root@{{domain}} 'journalctl -fu {{unit}}'
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 \
. [email protected]:ord
ssh [email protected] 'cd ord && ./deploy/setup'
time-tests:
cargo +nightly test -- -Z unstable-options --report-time
profile-tests:
cargo +nightly test -- -Z unstable-options --report-time \
| sed -n 's/^test \(.*\) ... ok <\(.*\)s>/\2 \1/p' | sort -n \
| tee test-times.txt
open:
open http:https://localhost
doc:
cargo doc --all --open
update-dev-server:
./bin/update-dev-server
start-dev-server-benchmark: && update-dev-server
systemctl stop ord-dev
rm /var/lib/ord-dev/index.redb
journalctl --rotate
journalctl --vacuum-time 1s
./bin/update-dev-server
# publish current GitHub master branch
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
git clone [email protected]:casey/ord.git tmp/release
cd tmp/release
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
cd ../..
rm -rf tmp/release
list-outdated-dependencies:
cargo outdated -R
cd test-bitcoincore-rpc && cargo outdated -R
update-modern-normalize:
curl \
https://raw.githubusercontent.com/sindresorhus/modern-normalize/main/modern-normalize.css \
> static/modern-normalize.css
download-log unit='ord' host='ordinals.com':
ssh root@{{host}} 'mkdir -p tmp && journalctl -u {{unit}} > tmp/{{unit}}.log'
rsync --progress root@{{host}}:tmp/{{unit}}.log tmp/{{unit}}.log
graph log:
./bin/graph $1
flamegraph dir=`git branch --show-current`:
./bin/flamegraph $1
benchmark index height-limit:
./bin/benchmark $1 $2
benchmark-revision rev:
ssh [email protected] "mkdir -p benchmark \
&& apt-get update --yes \
&& apt-get upgrade --yes \
&& apt-get install --yes git rsync"
rsync -avz benchmark/checkout [email protected]:benchmark/checkout
ssh [email protected] 'cd benchmark && ./checkout {{rev}}'
serve-docs:
mdbook serve docs --open
build-docs:
mdbook build docs
update-changelog:
git log --pretty='format:- %s' >> CHANGELOG.md