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