-
Notifications
You must be signed in to change notification settings - Fork 3.8k
/
Copy pathpre.sh
executable file
·52 lines (41 loc) · 1.68 KB
/
pre.sh
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
#!/usr/bin/env bash
## Create modules pages
for D in ../x/*; do
if [ -d "${D}" ]; then
DIR_NAME=$(basename "$D")
# Skip specific directories
if [[ "$DIR_NAME" != "counter" ]]; then
MODULE_DIRECTORY=build/modules/$DIR_NAME
rm -rf "$MODULE_DIRECTORY"
mkdir -p "$MODULE_DIRECTORY"
if [ -f "$D"/README.md ]; then
cp -r "$D"/README.md "$MODULE_DIRECTORY"
fi
fi
fi
done
## Vesting is a submodule of auth, but we still want to display it in docs
## TODO to be removed in https://github.com/cosmos/cosmos-sdk/issues/9958
cp -r ../x/auth/vesting/README.md ./build/modules/auth/1-vesting.md
cp -r ../x/auth/tx/README.md ./build/modules/auth/2-tx.md
## Add modules page list
cat ../x/README.md | sed 's/\.\.\/\/build\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./build/modules/README.md
## Add tooling documentation
cp ../tools/cosmovisor/README.md ./build/tooling/01-cosmovisor.md
cp ../tools/confix/README.md ./build/tooling/02-confix.md
cp ../tools/hubl/README.md ./build/tooling/03-hubl.md
## Add package documentation
cp ../client/v2/README.md ./learn/advanced/17-autocli.md
cp ../depinject/README.md ./build/packages/01-depinject.md
cp ../collections/README.md ./build/packages/02-collections.md
cp ../orm/README.md ./build/packages/03-orm.md
## Update user docs with rosetta
wget -O "./user/run-node/04-rosetta.md" "https://raw.githubusercontent.com/cosmos/rosetta/main/README.md"
## Add architecture documentation
cp -r ./architecture ./build
## Add spec documentation
cp -r ./spec ./build
## Add rfc documentation
cp -r ./rfc ./build
## Add SDK migration documentation
cp -r ../UPGRADING.md ./build/migrations/02-upgrading.md