Run cli docsgen in CI
This commit is contained in:
parent
483478d511
commit
ed08366cac
@ -436,7 +436,7 @@ jobs:
|
|||||||
- run:
|
- run:
|
||||||
command: "! go fmt ./... 2>&1 | read"
|
command: "! go fmt ./... 2>&1 | read"
|
||||||
|
|
||||||
cbor-gen-check:
|
gen-check:
|
||||||
executor: golang
|
executor: golang
|
||||||
steps:
|
steps:
|
||||||
- install-deps
|
- install-deps
|
||||||
@ -444,7 +444,10 @@ jobs:
|
|||||||
- run: make deps
|
- run: make deps
|
||||||
- run: go install golang.org/x/tools/cmd/goimports
|
- run: go install golang.org/x/tools/cmd/goimports
|
||||||
- run: go install github.com/hannahhoward/cbor-gen-for
|
- run: go install github.com/hannahhoward/cbor-gen-for
|
||||||
- run: make type-gen
|
- run: make gen
|
||||||
|
- run: git --no-pager diff
|
||||||
|
- run: git --no-pager diff --quiet
|
||||||
|
- run: make docsgen-cli
|
||||||
- run: git --no-pager diff
|
- run: git --no-pager diff
|
||||||
- run: git --no-pager diff --quiet
|
- run: git --no-pager diff --quiet
|
||||||
|
|
||||||
@ -701,7 +704,7 @@ workflows:
|
|||||||
concurrency: "16" # expend all docker 2xlarge CPUs.
|
concurrency: "16" # expend all docker 2xlarge CPUs.
|
||||||
- mod-tidy-check
|
- mod-tidy-check
|
||||||
- gofmt
|
- gofmt
|
||||||
- cbor-gen-check
|
- gen-check
|
||||||
- docs-check
|
- docs-check
|
||||||
- test:
|
- test:
|
||||||
codecov-upload: true
|
codecov-upload: true
|
||||||
|
6
Makefile
6
Makefile
@ -368,7 +368,13 @@ docsgen-openrpc-worker: docsgen-openrpc-bin
|
|||||||
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
|
.PHONY: docsgen docsgen-md-bin docsgen-openrpc-bin
|
||||||
|
|
||||||
gen: type-gen method-gen docsgen api-gen
|
gen: type-gen method-gen docsgen api-gen
|
||||||
|
@echo ">>> IF YOU'VE MODIFIED THE CLI, REMEMBER TO ALSO MAKE docsgen-cli"
|
||||||
.PHONY: gen
|
.PHONY: gen
|
||||||
|
|
||||||
|
# separate from gen because it needs binaries
|
||||||
|
docsgen-cli: lotus lotus-miner lotus-worker
|
||||||
|
python ./scripts/generate-lotus-cli.py
|
||||||
|
.PHONY: docsgen-cli
|
||||||
|
|
||||||
print-%:
|
print-%:
|
||||||
@echo $*=$($*)
|
@echo $*=$($*)
|
||||||
|
@ -1,8 +1,16 @@
|
|||||||
package build
|
package build
|
||||||
|
|
||||||
|
import "os"
|
||||||
|
|
||||||
var CurrentCommit string
|
var CurrentCommit string
|
||||||
var BuildType int
|
var BuildType int
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
|
||||||
|
CurrentCommit = ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BuildDefault = 0
|
BuildDefault = 0
|
||||||
BuildMainnet = 0x1
|
BuildMainnet = 0x1
|
||||||
|
@ -7,7 +7,7 @@ USAGE:
|
|||||||
lotus-miner [global options] command [command options] [arguments...]
|
lotus-miner [global options] command [command options] [arguments...]
|
||||||
|
|
||||||
VERSION:
|
VERSION:
|
||||||
1.11.0-dev+mainnet+git.12867a567.dirty
|
1.11.0-dev+mainnet
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
init Initialize a lotus miner repo
|
init Initialize a lotus miner repo
|
||||||
|
@ -7,7 +7,7 @@ USAGE:
|
|||||||
lotus-worker [global options] command [command options] [arguments...]
|
lotus-worker [global options] command [command options] [arguments...]
|
||||||
|
|
||||||
VERSION:
|
VERSION:
|
||||||
1.11.0-dev+2k+git.ac39417f4.dirty
|
1.11.0-dev+mainnet
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
run Start lotus worker
|
run Start lotus worker
|
||||||
|
@ -7,7 +7,7 @@ USAGE:
|
|||||||
lotus [global options] command [command options] [arguments...]
|
lotus [global options] command [command options] [arguments...]
|
||||||
|
|
||||||
VERSION:
|
VERSION:
|
||||||
1.11.0-dev+mainnet+git.12867a567.dirty
|
1.11.0-dev+mainnet
|
||||||
|
|
||||||
COMMANDS:
|
COMMANDS:
|
||||||
daemon Start a lotus daemon process
|
daemon Start a lotus daemon process
|
||||||
|
@ -46,6 +46,7 @@ def generate_lotus_cli(prog):
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
os.putenv("LOTUS_VERSION_IGNORE_COMMIT", "1")
|
||||||
generate_lotus_cli('lotus')
|
generate_lotus_cli('lotus')
|
||||||
generate_lotus_cli('lotus-miner')
|
generate_lotus_cli('lotus-miner')
|
||||||
generate_lotus_cli('lotus-worker')
|
generate_lotus_cli('lotus-worker')
|
||||||
|
Loading…
Reference in New Issue
Block a user