-
Notifications
You must be signed in to change notification settings - Fork 10
/
justfile
99 lines (66 loc) · 1.45 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
default := 'squid'
types := 'typegen'
process: build
node --require=dotenv/config lib/processor.js
serve:
@npx squid-graphql-server
up *FLAGS:
docker compose up {{FLAGS}}
upd:
@just up -d
pull:
docker compose pull
clear:
docker compose rm -f
rm -rf .data
down:
docker compose down
build:
npm run build
codegen:
npx squid-typeorm-codegen
typegen TAG=types:
npx squid-substrate-typegen {{TAG}}.json
explore:
npx squid-substrate-metadata-explorer \
--chain wss://statemine-rpc.polkadot.io \
--archive https://statemine.archive.subsquid.io/graphql \
--out kusamaVersions.jsonl
bug: down upd
reset: migrate
slow:
sleep 1
just reset
quickstart: migrate process
quick: wipe bug slow process
wipe:
clear
prod TAG:
gh pr create --base release-{{TAG}}
migrate:
npx squid-typeorm-migration apply
update-db:
npx squid-typeorm-migration generate
revert-db:
npx squid-typeorm-migration revert
db: update-db migrate
test:
npm run test:unit
improve TAG=default:
npx sqd deploy -m {{TAG}}.yaml .
release TAG=default:
npx sqd deploy -m {{TAG}}.yaml .
kill TAG:
npx sqd squid:kill "stick@{{TAG}}"
tail TAG:
npx sqd squid logs stick@{{TAG}} -f
brutal TAG=default:
npx sqd deploy -r -m {{TAG}}.yaml .
update-deps:
npx npm-check-updates -ux
exec:
docker exec -it subsquid_db psql -U postgres -d squid
dump NAME=default:
docker exec -t subsquid_db pg_dump -U postgres -d squid > {{NAME}}.sql
check: codegen build
kek: bug quick