Skip to content

Commit 874548f

Browse files
committed
Website/node-management: extract build-info commands to scripts
Extracted all build-info command examples from the node-management documentation into separate shell scripts that can be tested in CI, following the same pattern used in the developer documentation. Changes: - Created website/docs/node-operators/scripts/ directory - Added build-info-docker.sh for basic Docker usage - Added build-info-docker-version.sh for specific version - Added build-info-native.sh for native binary - Added build-info-native-path.sh for full path usage - Added verify-build-info-docker.sh for Docker verification - Added verify-build-info-native.sh for native verification - Converted node-management.md to .mdx - Updated documentation to use CodeBlock imports with raw-loader
1 parent 51b7d40 commit 874548f

File tree

7 files changed

+38
-19
lines changed

7 files changed

+38
-19
lines changed

website/docs/node-operators/node-management.md renamed to website/docs/node-operators/node-management.mdx

Lines changed: 32 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@ title: Node Management
44
description: Essential commands and tools for managing your Mina Rust node
55
---
66

7+
import CodeBlock from "@theme/CodeBlock";
8+
import BuildInfoDocker from "!!raw-loader!./scripts/build-info-docker.sh";
9+
import BuildInfoDockerVersion from "!!raw-loader!./scripts/build-info-docker-version.sh";
10+
import BuildInfoNative from "!!raw-loader!./scripts/build-info-native.sh";
11+
import BuildInfoNativePath from "!!raw-loader!./scripts/build-info-native-path.sh";
12+
import VerifyBuildInfoDocker from "!!raw-loader!./scripts/verify-build-info-docker.sh";
13+
import VerifyBuildInfoNative from "!!raw-loader!./scripts/verify-build-info-native.sh";
14+
715
# Node Management
816

917
This guide covers essential commands and tools for managing your Mina Rust node,
@@ -18,10 +26,9 @@ ensure you're running the correct version and to help with troubleshooting.
1826

1927
To check the build information of your Docker-based node:
2028

21-
```bash
22-
# Get build information
23-
docker run --rm o1labs/mina-rust:latest build-info
24-
```
29+
<CodeBlock language="bash" title="scripts/build-info-docker.sh">
30+
{BuildInfoDocker}
31+
</CodeBlock>
2532

2633
Example output:
2734

@@ -37,21 +44,23 @@ Rustc version: 1.84.1
3744

3845
For a specific version:
3946

40-
```bash
41-
docker run --rm o1labs/mina-rust:v0.17.0 build-info
42-
```
47+
<CodeBlock language="bash" title="scripts/build-info-docker-version.sh">
48+
{BuildInfoDockerVersion}
49+
</CodeBlock>
4350

4451
### Using Native Binary
4552

4653
If you've built from source or are running the binary directly:
4754

48-
```bash
49-
# Get build information
50-
mina build-info
55+
<CodeBlock language="bash" title="scripts/build-info-native.sh">
56+
{BuildInfoNative}
57+
</CodeBlock>
5158

52-
# Or with the full path if not in PATH
53-
./target/release/mina build-info
54-
```
59+
Or with the full path if not in PATH:
60+
61+
<CodeBlock language="bash" title="scripts/build-info-native-path.sh">
62+
{BuildInfoNativePath}
63+
</CodeBlock>
5564

5665
### Understanding Build Information
5766

@@ -69,13 +78,17 @@ The build info provides critical details:
6978

7079
Always verify your node version after installation or updates:
7180

72-
```bash
73-
# For Docker users
74-
docker run --rm o1labs/mina-rust:latest build-info | grep "Version\|branch"
81+
For Docker users:
7582

76-
# For native binary users
77-
mina build-info | grep "Version\|branch"
78-
```
83+
<CodeBlock language="bash" title="scripts/verify-build-info-docker.sh">
84+
{VerifyBuildInfoDocker}
85+
</CodeBlock>
86+
87+
For native binary users:
88+
89+
<CodeBlock language="bash" title="scripts/verify-build-info-native.sh">
90+
{VerifyBuildInfoNative}
91+
</CodeBlock>
7992

8093
## Monitoring Your Node
8194

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run --rm o1labs/mina-rust:v0.17.0 build-info
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run --rm o1labs/mina-rust:latest build-info
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
./target/release/mina build-info
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mina build-info
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker run --rm o1labs/mina-rust:latest build-info | grep "Version\|branch"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mina build-info | grep "Version\|branch"

0 commit comments

Comments
 (0)