Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(cmd): match upcoming node version with API #3318

Merged
merged 6 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ pb-gen:
## openrpc-gen: Generate OpenRPC spec for Celestia-Node's RPC api
openrpc-gen:
@echo "--> Generating OpenRPC spec"
@go run ./cmd/docgen fraud header state share das p2p node blob da
@go run ${LDFLAGS} ./cmd/celestia docgen fraud header state share das p2p node blob da
.PHONY: openrpc-gen

## lint-imports: Lint only Go imports.
Expand Down
14 changes: 1 addition & 13 deletions cmd/docgen/openrpc.go → cmd/celestia/docgen.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package main

import (
"context"
"encoding/json"
"os"

Expand All @@ -11,7 +10,7 @@ import (
"github.com/celestiaorg/celestia-node/nodebuilder"
)

var rootCmd = &cobra.Command{
var docgenCmd = &cobra.Command{
Use: "docgen [packages]",
Short: "docgen generates the openrpc documentation for Celestia Node packages",
RunE: func(_ *cobra.Command, moduleNames []string) error {
Expand Down Expand Up @@ -42,14 +41,3 @@ var rootCmd = &cobra.Command{
return err
},
}

func main() {
err := run()
if err != nil {
os.Exit(1)
}
}

func run() error {
return rootCmd.ExecuteContext(context.Background())
}
1 change: 1 addition & 0 deletions cmd/celestia/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ func init() {
bridgeCmd,
lightCmd,
fullCmd,
docgenCmd,
versionCmd,
)
rootCmd.SetHelpCommand(&cobra.Command{})
Expand Down
2 changes: 1 addition & 1 deletion nodebuilder/node/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/celestiaorg/celestia-node/libs/authtoken"
)

const APIVersion = "v0.11.0"
var APIVersion = GetBuildInfo().SemanticVersion

type module struct {
tp Type
Expand Down
Loading