Skip to content

Commit

Permalink
sptool: Make cli docsgen happy
Browse files Browse the repository at this point in the history
  • Loading branch information
magik6k committed Mar 18, 2024
1 parent 079f73b commit e5c3c84
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/sptool/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func main() {
},
&cli.StringFlag{
Name: "actor",
Required: true,
Required: os.Getenv("LOTUS_DOCS_GENERATION") != "1",
Usage: "miner actor to manage",
},
},
Expand Down
51 changes: 51 additions & 0 deletions documentation/en/cli-sptool.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# sptool
```
NAME:
sptool - Manage Filecoin Miner Actor
USAGE:
sptool [global options] command [command options] [arguments...]
VERSION:
1.27.0-dev
COMMANDS:
actor Manage Filecoin Miner Actor Metadata
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--log-level value (default: "info")
--actor value miner actor to manage
--help, -h show help
--version, -v print the version
```

## sptool actor
```
NAME:
sptool actor - Manage Filecoin Miner Actor Metadata
USAGE:
sptool actor command [command options] [arguments...]
COMMANDS:
withdraw withdraw available balance to beneficiary
help, h Shows a list of commands or help for one command
OPTIONS:
--help, -h show help
```

### sptool actor withdraw
```
NAME:
sptool actor withdraw - withdraw available balance to beneficiary
USAGE:
sptool actor withdraw [command options] [amount (FIL)]
OPTIONS:
--confidence value number of block confirmations to wait for (default: 5)
--beneficiary send withdraw message from the beneficiary address (default: false)
--help, -h show help
```
3 changes: 3 additions & 0 deletions scripts/generate-lotus-cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ def get_cmd_recursively(cur_cmd):
for e in [ "LOTUS_PATH", "LOTUS_MARKETS_PATH", "LOTUS_MINER_PATH", "LOTUS_STORAGE_PATH", "LOTUS_WORKER_PATH", "WORKER_PATH", "LOTUS_PANIC_REPORT_PATH", "WALLET_PATH" ]:
os.environ.pop(e, None)

# Set env var telling the binaries that we're generating docs
os.putenv("LOTUS_DOCS_GENERATION", "1")

os.putenv("LOTUS_VERSION_IGNORE_COMMIT", "1")
generate_lotus_cli('lotus')
generate_lotus_cli('lotus-miner')
Expand Down

0 comments on commit e5c3c84

Please sign in to comment.