Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(docs): fix script for docs #18443

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 18 additions & 17 deletions docs/pre.sh
Original file line number Diff line number Diff line change
@@ -1,41 +1,42 @@
#!/usr/bin/env bash

## Create modules pages
for D in ../x/*; do
for D in x/*; do
if [ -d "${D}" ]; then
MODDOC=build/modules/$(echo $D | awk -F/ '{print $NF}')
MODDOC=docs/docs/build/modules/$(echo $D | awk -F/ '{print $NF}')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this an issue? docs/docs doesnt exist anymore

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apologies, this should just be for 0.50 and 0.47

rm -rf $MODDOC
mkdir -p $MODDOC && cp -r $D/README.md "$_"
mkdir -p $MODDOC && cp -r $D/README.md "$MODDOC"
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
cp x/auth/vesting/README.md docs/docs/build/modules/auth/1-vesting.md
cp x/auth/tx/README.md docs/docs/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
cat x/README.md | sed 's/\.\.\/docs\docs\/build\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > docs/docs/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
cp tools/cosmovisor/README.md docs/docs/build/tooling/01-cosmovisor.md
cp tools/confix/README.md docs/docs/build/tooling/02-confix.md
cp tools/hubl/README.md docs/docs/build/tooling/03-hubl.md
wget -O docs/docs/user/run-node/04-rosetta.md https://raw.githubusercontent.com/cosmos/rosetta/main/README.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
cp client/v2/README.md docs/docs/learn/advanced/17-autocli.md
cp depinject/README.md docs/docs/build/packages/01-depinject.md
cp collections/README.md docs/docs/build/packages/02-collections.md
cp orm/README.md docs/docs/build/packages/03-orm.md

## Add architecture documentation
cp -r ./architecture ./build
cp -r docs/architecture docs/docs/build

## Add spec documentation
cp -r ./spec ./build
cp -r docs/spec docs/docs/build

## Add rfc documentation
cp -r ./rfc ./build
cp -r docs/rfc docs/docs/build/rfc

## Add SDK migration documentation
cp -r ../UPGRADING.md ./build/migrations/02-upgrading.md
cp -r UPGRADING.md docs/docs/build/migrations/02-upgrading.md
Loading