Skip to content

Commit

Permalink
Merge pull request #6145 from filecoin-project/feat/cli-doc-gen
Browse files Browse the repository at this point in the history
Generate CLI docs
  • Loading branch information
magik6k authored Apr 30, 2021
2 parents eb10918 + 3574ec3 commit e855b80
Show file tree
Hide file tree
Showing 7 changed files with 4,716 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -436,15 +436,18 @@ jobs:
- run:
command: "! go fmt ./... 2>&1 | read"

cbor-gen-check:
gen-check:
executor: golang
steps:
- install-deps
- prepare
- 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

Expand Down Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 $*=$($*)
6 changes: 6 additions & 0 deletions build/version.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package build

import "os"

var CurrentCommit string
var BuildType int

Expand Down Expand Up @@ -32,5 +34,9 @@ func buildType() string {
const BuildVersion = "1.11.0-dev"

func UserVersion() string {
if os.Getenv("LOTUS_VERSION_IGNORE_COMMIT") == "1" {
return BuildVersion
}

return BuildVersion + buildType() + CurrentCommit
}
Loading

0 comments on commit e855b80

Please sign in to comment.