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

Max/autodoc workspace #5102

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
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
23 changes: 22 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ members = [
"common/wasm/utils",
"common/wireguard",
"common/wireguard-types",
# "documentation/autodoc",
"documentation/autodoc",
"explorer-api",
"explorer-api/explorer-api-requests",
"explorer-api/explorer-client",
Expand Down
16 changes: 9 additions & 7 deletions documentation/autodoc/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ fn main() -> io::Result<()> {
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
writeln!(
file,
"# {} Binary Commands (Autogenerated)",
format!("`{}`", last_word.unwrap())
"# `{}` Binary Commands (Autogenerated)",
last_word.unwrap()
)?;

writeln!(
file,
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
Expand All @@ -151,9 +152,10 @@ fn main() -> io::Result<()> {
let mut file = File::create(format!("{}/{}-commands.md", WRITE_PATH, last_word.unwrap()))?;
writeln!(
file,
"# {} Binary Commands (Autogenerated)",
format!("`{}`", last_word.unwrap())
"# `{}` Binary Commands (Autogenerated)",
last_word.unwrap()
)?;

writeln!(
file,
"\nThese docs are autogenerated by the [`autodocs`](https://github.com/nymtech/nym/tree/max/new-docs-framework/documentation/autodoc) script."
Expand Down Expand Up @@ -190,9 +192,9 @@ fn execute_command_own_file(main_command: &str, subcommand: &str) -> io::Result<
// this check is basically checking for the rare commands (rn just one) that start a process with no params
// perhaps if this list grows we could just add a timeout and shunt the running and writing
// into a thread with a timeout or something but for right now its fine / thats overkill
if get_last_word_from_filepath(main_command).unwrap() == "nym-node" && subcommand == "run"
|| get_last_word_from_filepath(main_command).unwrap() == "nym-api" && subcommand == "run"
|| get_last_word_from_filepath(main_command).unwrap() == "nymvisor" && subcommand == "run"
let last_word = get_last_word_from_filepath(main_command).unwrap();
if (last_word == "nym-node" || last_word == "nym-api" || last_word == "nymvisor")
&& subcommand == "run"
{
info!("SKIPPING {} {}", main_command, subcommand);
} else {
Expand Down
Loading