Skip to content

Commit

Permalink
Problem: Missing support of uploading cpp documents to gitbook platfo…
Browse files Browse the repository at this point in the history
…rm (fix #396)

Close:
- #396

Solution:
- Add cronos-play-docs as submodule
- Update Makefile cpp-docs and cpp-cronos-play-docs
  • Loading branch information
damoncro committed Jun 2, 2022
1 parent 7457bc2 commit 3ef31f7
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,5 @@ jobs:
run: make cpp-docs-gitbook
- name: Generate mdbook
run: make cpp-docs-mdbook
- name: Generate cronos-play-docs
run: make cpp-cronos-play-docs
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@
[submodule "third_party/luna_classic"]
path = third_party/luna_classic
url = https://github.com/terra-money/classic-core.git
[submodule "docs/cpp/cronos-play-docs"]
path = docs/cpp/cronos-play-docs
url = [email protected]:crypto-org-chain/cronos-play-docs.git
18 changes: 16 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ cpp: build_cpp
# to fix link error on macos
. ./checkmac.sh && . ./scripts/.env && cd $(cpp_example) && make run

cppx86_64:
cppx86_64:
. ./checkmac.sh && rustup target add x86_64-apple-darwin
. ./checkmac.sh && cargo build --package defi-wallet-core-cpp --release --target x86_64-apple-darwin
. ./checkmac.sh && cd $(cpp_example) && make x86_64_build
Expand Down Expand Up @@ -88,7 +88,7 @@ cpp-ci-tests: build_cpp
cpp-tests: python-tests

# Choose the defualt cpp docs engine
cpp-docs: cpp-docs-gitbook
cpp-docs: cpp-cronos-play-docs

cpp-docs-doxygen: build_cpp
@nix-shell ./docs/cpp/shell.nix --run "cd $(cpp_docs) && doxygen"
Expand All @@ -102,6 +102,20 @@ ifeq ($(UNAME), Darwin)
open $(cpp_docs)/sphinx/_build/html/index.html
endif

cpp-cronos-play-docs: build_cpp
@nix-shell ./docs/cpp/shell.nix --run "\
cd $(cpp_docs) && doxygen && doxybook2 \
--input doxygen/xml \
--output cronos-play-docs \
--config config.json \
--summary-input SUMMARY.md.tmpl \
--summary-output cronos-play-docs/SUMMARY.md \
&& cd cronos-play-docs && gitbook build"
ifeq ($(UNAME), Darwin)
@nix-shell ./docs/cpp/shell.nix --run "\
cd $(cpp_docs)/cronos-play-docs/src && gitbook serve --open"
endif

cpp-docs-gitbook: build_cpp
@nix-shell ./docs/cpp/shell.nix --run "\
cd $(cpp_docs) && doxygen && doxybook2 \
Expand Down
1 change: 1 addition & 0 deletions docs/cpp/cronos-play-docs
Submodule cronos-play-docs added at a53e50

0 comments on commit 3ef31f7

Please sign in to comment.