Commit 8057f40 1 parent f32174f commit 8057f40 Copy full SHA for 8057f40
File tree 5 files changed +10
-44
lines changed
5 files changed +10
-44
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ GO_VERSION=1.22
4
4
GO_SYSTEM_VERSION = $(shell go version | cut -c 14- | cut -d' ' -f1 | cut -d'.' -f1-2)
5
5
REQUIRE_GO_VERSION = $(GO_VERSION )
6
6
7
+ WEAVE_VERSION =v0.0.1
8
+
7
9
BUILDDIR ?= $(CURDIR ) /build
8
10
BUILD_TARGETS = build
9
11
@@ -20,7 +22,7 @@ $(BUILD_TARGETS): check_version go.sum $(BUILDDIR)/
20
22
ifeq ($(OS ) ,Windows_NT)
21
23
exit 1
22
24
else
23
- go $@ -mod=readonly .
25
+ go $@ -mod=readonly -ldflags "-X github.com/initia-labs/weave/cmd.Version=$(WEAVE_VERSION)" .
24
26
endif
25
27
26
28
$(BUILDDIR ) / :
Original file line number Diff line number Diff line change @@ -12,8 +12,7 @@ import (
12
12
func InitCommand () * cobra.Command {
13
13
initCmd := & cobra.Command {
14
14
Use : "init" ,
15
- Short : "Init for initializing the weave CLI." ,
16
- Long : "Init for initializing the weave CLI." ,
15
+ Short : "Initialize Weave CLI, funding gas station and setting up config." ,
17
16
RunE : func (cmd * cobra.Command , args []string ) error {
18
17
if utils .IsFirstTimeSetup () {
19
18
// Capture both the final model and the error from Run()
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ func InitiaCommand() *cobra.Command {
45
45
func initiaInitCommand () * cobra.Command {
46
46
initCmd := & cobra.Command {
47
47
Use : "init" ,
48
- Short : "Init for initializing the initia CLI. " ,
48
+ Short : "Bootstrap your Initia full node " ,
49
49
RunE : func (cmd * cobra.Command , args []string ) error {
50
50
if utils .IsFirstTimeSetup () {
51
51
// Capture both the final model and the error from Run()
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ func MinitiaCommand() *cobra.Command {
27
27
func minitiaLaunchCommand () * cobra.Command {
28
28
launchCmd := & cobra.Command {
29
29
Use : "launch" ,
30
- Short : "Launch for initializing a new L2 node. " ,
30
+ Short : "Launch a new Minitia from scratch " ,
31
31
RunE : func (cmd * cobra.Command , args []string ) error {
32
32
if utils .IsFirstTimeSetup () {
33
33
// Capture both the final model and the error from Run()
Original file line number Diff line number Diff line change @@ -3,51 +3,16 @@ package cmd
3
3
import (
4
4
"context"
5
5
6
- tea "github.com/charmbracelet/bubbletea"
7
6
"github.com/spf13/cobra"
8
- "github.com/spf13/viper"
9
-
10
- "github.com/initia-labs/weave/models"
11
- "github.com/initia-labs/weave/utils"
12
7
)
13
8
9
+ var Version string
10
+
14
11
func Execute () error {
15
12
rootCmd := & cobra.Command {
16
- Version : "v1.0.0" ,
13
+ Version : Version ,
17
14
Use : "weave" ,
18
- Long : "Weave is a CLI for managing Initia deployments." ,
19
- PersistentPreRunE : func (cmd * cobra.Command , args []string ) error {
20
- viper .AutomaticEnv ()
21
- viper .SetEnvPrefix ("weave" )
22
-
23
- if err := utils .InitializeConfig (); err != nil {
24
- return err
25
- }
26
-
27
- return nil
28
- },
29
- RunE : func (cmd * cobra.Command , args []string ) error {
30
- if utils .IsFirstTimeSetup () {
31
- // Capture both the final model and the error from Run()
32
- finalModel , err := tea .NewProgram (models .NewExistingAppChecker ()).Run ()
33
- if err != nil {
34
- return err
35
- }
36
-
37
- // Check if the final model is of type WeaveAppSuccessfullyInitialized
38
- if _ , ok := finalModel .(* models.WeaveAppSuccessfullyInitialized ); ! ok {
39
- // If the model is not of the expected type, return or handle as needed
40
- return nil
41
- }
42
- }
43
-
44
- _ , err := tea .NewProgram (models .NewHomepage ()).Run ()
45
- if err != nil {
46
- return err
47
- }
48
-
49
- return nil
50
- },
15
+ Long : "Weave is the CLI for managing Initia deployments." ,
51
16
}
52
17
53
18
rootCmd .AddCommand (InitCommand ())
You can’t perform that action at this time.
0 commit comments