Skip to content

Commit ee1468f

Browse files
committed
feat: integrate sentinel-go-sdk version command
1 parent 0e0bd57 commit ee1468f

File tree

6 files changed

+15
-14
lines changed

6 files changed

+15
-14
lines changed

Makefile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,8 @@ COMMIT := $(shell git log -1 --format='%H')
44

55
TAGS := $(strip netgo)
66
LD_FLAGS := -s -w \
7-
-X github.com/cosmos/cosmos-sdk/version.Name=sentinel \
8-
-X github.com/cosmos/cosmos-sdk/version.AppName=dvpnx \
9-
-X github.com/cosmos/cosmos-sdk/version.Version=${VERSION} \
10-
-X github.com/cosmos/cosmos-sdk/version.Commit=${COMMIT} \
11-
-X github.com/cosmos/cosmos-sdk/version.BuildTags=${TAGS}
7+
-X github.com/sentinel-official/sentinel-go-sdk/version.GitCommit=${COMMIT} \
8+
-X github.com/sentinel-official/sentinel-go-sdk/version.Version=${VERSION}
129

1310
.PHONY: benchmark
1411
benchmark:

cmd/init.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ func InitCmd() *cobra.Command {
1717
cmd := &cobra.Command{
1818
Use: "init",
1919
Short: "Initialize the application configuration",
20+
Long: `Creates the application home directory and generates a default config.toml file.
21+
If a configuration file already exists, this command will abort unless the "force" flag
22+
is set to overwrite the existing configuration.`,
2023
RunE: func(cmd *cobra.Command, args []string) error {
2124
// Retrieve Viper instance for managing configuration
2225
v := viper.GetViper()

cmd/root.go

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"os"
66
"path/filepath"
77

8-
"github.com/cosmos/cosmos-sdk/version"
98
"github.com/sentinel-official/sentinel-go-sdk/cmd"
109
"github.com/spf13/cobra"
1110
"github.com/spf13/viper"
@@ -17,10 +16,10 @@ func NewRootCmd(homeDir string) *cobra.Command {
1716
rootCmd := &cobra.Command{
1817
Use: "dvpnx",
1918
Short: "Run and manage the Sentinel dVPN node",
20-
Long: `The Sentinel dVPN node software lets users join the decentralized VPN network on the Sentinel Hub blockchain,
21-
providing secure, private, and censorship-resistant internet access while earning cryptocurrency rewards.
22-
It integrates with Cosmos-SDK, supports robust configuration, and offers tools for key management and
23-
node initialization, ensuring privacy, performance, and ease of use.`,
19+
Long: `The Sentinel dVPN node software lets users join the decentralized VPN network on the Sentinel Hub
20+
blockchain, providing secure, private, and censorship-resistant internet access while earning
21+
cryptocurrency rewards. It integrates with Cosmos-SDK, supports robust configuration, and offers
22+
tools for key management and node initialization, ensuring privacy, performance, and ease of use.`,
2423
SilenceUsage: true,
2524
CompletionOptions: cobra.CompletionOptions{
2625
DisableDefaultCmd: true,
@@ -67,9 +66,9 @@ node initialization, ensuring privacy, performance, and ease of use.`,
6766
// Add subcommands
6867
rootCmd.AddCommand(
6968
cmd.KeysCmd(),
69+
cmd.NewVersionCmd(),
7070
InitCmd(),
7171
StartCmd(),
72-
version.NewVersionCommand(),
7372
)
7473

7574
// Persistent flags

cmd/start.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ func StartCmd() *cobra.Command {
2020
cmd := &cobra.Command{
2121
Use: "start",
2222
Short: "Start the Sentinel dVPN node",
23+
Long: `Starts the Sentinel dVPN node. Initializes the logger, sets up the context and node,
24+
explicitly starts the node, and handles SIGINT/SIGTERM for graceful shutdown.`,
2325
RunE: func(cmd *cobra.Command, args []string) error {
2426
// Get the home directory from viper configuration.
2527
homeDir := viper.GetString("home")

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/gin-contrib/cors v1.7.3
1313
github.com/gin-gonic/gin v1.10.0
1414
github.com/sentinel-official/hub/v12 v12.0.0-rc9
15-
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120101212-36986a72d34a
15+
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120183109-7de793d94338
1616
github.com/soheilhy/cmux v0.1.5
1717
github.com/spf13/cobra v1.8.1
1818
github.com/spf13/viper v1.19.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,8 +512,8 @@ github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb h1:XfLJSPIO
512512
github.com/seiflotfy/cuckoofilter v0.0.0-20220411075957-e3b120b3f5fb/go.mod h1:bR6DqgcAl1zTcOX8/pE2Qkj9XO00eCNqmKb7lXP8EAg=
513513
github.com/sentinel-official/hub/v12 v12.0.0-rc9 h1:ZLCOUyFCvu8D3S8HNX6sWKm5wE7IS+2mjVjI9Iv1ark=
514514
github.com/sentinel-official/hub/v12 v12.0.0-rc9/go.mod h1:XouLQPAOkYh5PEcForT+YfoPOf3AfNS9dV6moyVb68k=
515-
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120101212-36986a72d34a h1:+MAK3bdZkPkWD8FBvvm7RecPwLCq/EXcvIXvqKxSp6c=
516-
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120101212-36986a72d34a/go.mod h1:T9xUZH4e6Ro/Dg01481+GP5oyQPriLkGrvQ2gctptz4=
515+
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120183109-7de793d94338 h1:+h2pKZu1VEbXFii+4LU8pssCzwzJjejVWko/7TcGOHw=
516+
github.com/sentinel-official/sentinel-go-sdk v1.0.0-rc5.0.20250120183109-7de793d94338/go.mod h1:T9xUZH4e6Ro/Dg01481+GP5oyQPriLkGrvQ2gctptz4=
517517
github.com/shirou/gopsutil/v4 v4.24.11 h1:WaU9xqGFKvFfsUv94SXcUPD7rCkU0vr/asVdQOBZNj8=
518518
github.com/shirou/gopsutil/v4 v4.24.11/go.mod h1:s4D/wg+ag4rG0WO7AiTj2BeYCRhym0vM7DHbZRxnIT8=
519519
github.com/showwin/speedtest-go v1.7.9 h1:5b3T3U3WSppVXFqsIqF1zdHRYKKVuPNpzFU71HnYNEY=

0 commit comments

Comments
 (0)