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 #18444

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
36 changes: 18 additions & 18 deletions docs/pre.sh
Original file line number Diff line number Diff line change
@@ -1,42 +1,42 @@
#!/usr/bin/env bash

## Create modules pages
for D in ../x/*; do
for D in x/*; do
if [ -d "${D}" ]; then
MODDOC=docs/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.

did a pr get backported that wasnt suppose to?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ive just looked into it and it doesnt seem like it, otherwise there could be a chance its been broken for a while

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hmm, now I dont think this will fix the issue in the docs-repo

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 ../x/auth/vesting/README.md ./docs/build/modules/auth/1-vesting.md
cp ../x/auth/tx/README.md ./docs/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/\.\.\/docs\/build\/building-modules\/README\.md/\/building-modules\/intro\.html/g' > ./docs/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 ./docs/build/tooling/01-cosmovisor.md
cp ../tools/confix/README.md ./docs/build/tooling/02-confix.md
cp ../tools/hubl/README.md ./docs/build/tooling/03-hubl.md
wget -O docs/user/run-node/04-rosetta.md https://raw.githubusercontent.com/cosmos/rosetta/main/README.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 ./docs/learn/advanced/17-autocli.md
cp ../depinject/README.md ./docs/build/packages/01-depinject.md
cp ../collections/README.md ./docs/build/packages/02-collections.md
cp ../orm/README.md ./docs/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 ./docs/build
cp -r docs/architecture docs/docs/build

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

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

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