diff --git a/cli/.goreleaser.yaml b/cli/.goreleaser.yaml index a65edfee..526cf924 100644 --- a/cli/.goreleaser.yaml +++ b/cli/.goreleaser.yaml @@ -6,40 +6,76 @@ before: - go mod tidy # you may remove this if you don't need go generate - go generate ./... + - go build builds: - - env: + - binary: "dive" + env: - CGO_ENABLED=0 goos: - linux - windows - darwin + goarch: + - amd64 + - arm64 archives: - format: tar.gz # this name template makes the OS and Arch compatible with the results of uname. name_template: >- - {{ .ProjectName }}_ - {{- title .Os }}_ + {{ tolower .ProjectName }}_ + {{- tolower .Os }}_ {{- if eq .Arch "amd64" }}x86_64 {{- else if eq .Arch "386" }}i386 {{- else }}{{ .Arch }}{{ end }} - {{- if .Arm }}v{{ .Arm }}{{ end }} + {{- if .Arm }}v{{ .Arm }}{{ end }}_{{ .Tag }} # use zip for windows archives format_overrides: - - goos: windows - format: zip + - goos: windows + format: zip + +brews: + # creates a brew formula representing the latest version + - name: dive + tap: + owner: hugobyte + name: homebrew-tap + commit_author: + name: shreyasbhat0 + commit_msg_template: "Automated formula update for the CLI, version {{ .Tag }}" + homepage: "https://hugobyte.com" + description: "CLI for Dive Package" + license: "Apache 2.0" + # NOTE: Goreleaser *should* automatically detect the binaries packaged inside the archives being installed by the Homebrew formula, but it doesn't due to: + # https://github.com/goreleaser/goreleaser/issues/2488 + # When this is fixed, we can remove this section + install: | + bin.install "dive" + + # creates a versioned brew formula, enabling installation of specific versions of kurtosis cli + - name: dive@{{ .Tag }} + tap: + owner: hugobyte + name: homebrew-tap + commit_author: + name: shreyasbhat0 + commit_msg_template: "Automated formula created for the CLI, version {{ .Tag }}" + homepage: "https://www.kurtosistech.com" + description: "CLI for managing Kurtosis environments." + license: "Apache 2.0" + # NOTE: Goreleaser *should* automatically detect the binaries packaged inside the archives being installed by the Homebrew formula, but it doesn't due to: + # https://github.com/goreleaser/goreleaser/issues/2488 + # When this is fixed, we can remove this section + install: | + bin.install "dive" + checksum: - name_template: 'checksums.txt' + name_template: "checksums.txt" snapshot: - name_template: "{{ incpatch .Version }}-next" + name_template: "{{ incpatch .Tag }}" changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' - -# The lines beneath this are called `modelines`. See `:help modeline` -# Feel free to remove those if you don't want/use them. -# yaml-language-server: $schema=https://goreleaser.com/static/schema.json -# vim: set ts=2 sw=2 tw=0 fo=cnqoj + - "^docs:" + - "^test:" diff --git a/cli/commands/bridge/bridge.go b/cli/commands/bridge/bridge.go index efe13009..5014ea9f 100644 --- a/cli/commands/bridge/bridge.go +++ b/cli/commands/bridge/bridge.go @@ -29,6 +29,7 @@ func NewBridgeCmd(diveContext *common.DiveContext) *cobra.Command { Long: `To connect two different chains using any of the supported cross chain communication protocols. This will create an relay to connect two different chains and pass any messages between them.`, Run: func(cmd *cobra.Command, args []string) { + cmd.Help() }, } @@ -45,10 +46,7 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { Short: "Starts BTP Bridge between ChainA and ChainB", Long: ``, Run: func(cmd *cobra.Command, args []string) { - if len(args) != 0 { - diveContext.FatalError("Invalid Usage of command. Find cmd", cmd.UsageString()) - - } + common.ValidateCmdArgs(args, cmd.UsageString()) enclaveCtx, err := diveContext.GetEnclaveContext() @@ -63,7 +61,7 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { if strings.ToLower(chainA) == "icon" && strings.ToLower(chainB) == "icon" { - diveContext.SetSpinnerMessage("Executing BTP Starlark Package") + diveContext.SetSpinnerMessage(" Executing BTP Starlark Package") data, _, err := enclaveCtx.RunStarlarkRemotePackage(diveContext.Ctx, common.DiveRemotePackagePath, common.DiveBridgeScript, bridgeMainFunction, params, common.DiveDryRun, common.DiveDefaultParallelism, []kurtosis_core_rpc_api_bindings.KurtosisFeatureFlag{}) @@ -74,9 +72,8 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { common.WriteToFile(response) - diveContext.SetSpinnerMessage(fmt.Sprintf("BTP Bridge Setup Completed between %s and %s", chainA, chainB)) } else if strings.ToLower(chainA) == "icon" && (strings.ToLower(chainB) == "eth" || strings.ToLower(chainB) == "hardhat") { - diveContext.SetSpinnerMessage("Executing BTP Starlark Package") + diveContext.SetSpinnerMessage(" Executing BTP Starlark Package") data, _, err := enclaveCtx.RunStarlarkRemotePackage(diveContext.Ctx, common.DiveRemotePackagePath, common.DiveBridgeScript, bridgeMainFunction, params, common.DiveDryRun, common.DiveDefaultParallelism, []kurtosis_core_rpc_api_bindings.KurtosisFeatureFlag{}) if err != nil { @@ -85,12 +82,12 @@ func btpBridgeCmd(diveContext *common.DiveContext) *cobra.Command { response := diveContext.GetSerializedData(data) common.WriteToFile(response) - diveContext.SetSpinnerMessage(fmt.Sprintf("BTP Bridge Setup Completed between %s and %s", chainA, chainB)) + } else { diveContext.FatalError("Chains Not Supported", "Supported Chains [icon,eth,hardhat]") } - diveContext.StopSpinner(" Execution Completed") + diveContext.StopSpinner(fmt.Sprintf("BTP Bridge Setup Completed between %s and %s", chainA, chainB)) }, } diff --git a/cli/commands/chain/types/eth.go b/cli/commands/chain/types/eth.go index c90d77a1..42084723 100644 --- a/cli/commands/chain/types/eth.go +++ b/cli/commands/chain/types/eth.go @@ -15,10 +15,7 @@ func NewEthCmd(diveContext *common.DiveContext) *cobra.Command { It establishes a connection to the Ethereum network and allows the node in executing smart contracts and maintaining the decentralized ledger.`, Run: func(cmd *cobra.Command, args []string) { - if len(args) != 0 { - diveContext.FatalError("Invalid Usage of command. Find cmd", cmd.UsageString()) - - } + common.ValidateCmdArgs(args, cmd.UsageString()) data, err := RunEthNode(diveContext) diff --git a/cli/commands/chain/types/hardhat.go b/cli/commands/chain/types/hardhat.go index 1790ef6b..cabac9d5 100644 --- a/cli/commands/chain/types/hardhat.go +++ b/cli/commands/chain/types/hardhat.go @@ -15,10 +15,7 @@ func NewHardhatCmd(diveContext *common.DiveContext) *cobra.Command { It establishes a connection to the hardhat network and allows the node in executing smart contracts and maintaining the decentralized ledger.`, Run: func(cmd *cobra.Command, args []string) { - if len(args) != 0 { - diveContext.FatalError("Invalid Usage of command. Find cmd", cmd.UsageString()) - - } + common.ValidateCmdArgs(args, cmd.UsageString()) data, err := RunHardhatNode(diveContext) diff --git a/cli/commands/chain/types/icon.go b/cli/commands/chain/types/icon.go index 10b119fe..a1ca1dd2 100644 --- a/cli/commands/chain/types/icon.go +++ b/cli/commands/chain/types/icon.go @@ -72,10 +72,7 @@ func NewIconCmd(diveContext *common.DiveContext) *cobra.Command { It establishes a connection to the Icon network and allows the node in executing smart contracts and maintaining the decentralized ledger.`, Run: func(cmd *cobra.Command, args []string) { - if len(args) != 0 { - diveContext.FatalError("Invalid Usage of command. Find cmd", cmd.UsageString()) - - } + common.ValidateCmdArgs(args, cmd.UsageString()) decentralisation, _ := cmd.Flags().GetBool("decentralisation") diff --git a/cli/commands/clean/clean.go b/cli/commands/clean/clean.go index 744c05b8..e38d84cb 100644 --- a/cli/commands/clean/clean.go +++ b/cli/commands/clean/clean.go @@ -16,7 +16,7 @@ func NewCleanCmd(diveContext *common.DiveContext) *cobra.Command { Short: "Cleans up Kurtosis leftover artifacts", Long: `Destroys and removes any running encalves. If no enclaves running to remove it will throw an error`, Run: func(cmd *cobra.Command, args []string) { - + common.ValidateCmdArgs(args, cmd.UsageString()) enclaveName := diveContext.GetEnclaves() if enclaveName == "" { logrus.Errorf("No enclaves running to clean !!") diff --git a/cli/commands/discord/discord.go b/cli/commands/discord/discord.go index 948e0c30..683383b2 100644 --- a/cli/commands/discord/discord.go +++ b/cli/commands/discord/discord.go @@ -19,6 +19,7 @@ var DiscordCmd = &cobra.Command{ to access the dedicated DIVE community. It allows users to engage in discussions, seek support, share insights, and collaborate with other members of the DIVE community within the Discord platform.`, Run: func(cmd *cobra.Command, args []string) { + common.ValidateCmdArgs(args, cmd.UsageString()) logrus.Info("Redirecting to DIVE discord channel...") if err := common.OpenFile(diveURL); err != nil { logrus.Errorf("Failed to open Dive discord channel with error %v", err) diff --git a/cli/commands/tutorial/tutorial.go b/cli/commands/tutorial/tutorial.go index 58dcb83b..2b8670f0 100644 --- a/cli/commands/tutorial/tutorial.go +++ b/cli/commands/tutorial/tutorial.go @@ -9,7 +9,7 @@ import ( "github.com/spf13/cobra" ) -const tutorialURL = "https://www.youtube.com/@hugobyte" +const tutorialURL = "https://www.youtube.com/playlist?list=PL5Xd9z-fRL1vKtRlOzIlkhROspSSDeGyG" // tutorilaCmd redirects users to DIVE youtube playlist var TutorialCmd = &cobra.Command{ @@ -19,6 +19,7 @@ var TutorialCmd = &cobra.Command{ directing users to a curated collection of tutorial videos specifically designed to guide and educate users about DIVE. The playlist offers step-by-step instructions, tips, and demonstrations to help users better understand and utilize the features and functionalities of DIVE.`, Run: func(cmd *cobra.Command, args []string) { + common.ValidateCmdArgs(args, cmd.UsageString()) logrus.Info("Redirecting to YouTube...") if err := common.OpenFile(tutorialURL); err != nil { logrus.Errorf("Failed to open Dive YouTube chanel with error %v", err) diff --git a/cli/commands/twitter/twitter.go b/cli/commands/twitter/twitter.go index e195da0b..1c74c27e 100644 --- a/cli/commands/twitter/twitter.go +++ b/cli/commands/twitter/twitter.go @@ -20,6 +20,7 @@ to the designated Twitter profile of HugoByte, providing access to the latest up shared by the official HugoByte Twitter account. Users can stay informed about HugoByte's activities, engage with the community, and follow our social media presence directly from the Twitter homepage.`, Run: func(cmd *cobra.Command, args []string) { + common.ValidateCmdArgs(args, cmd.UsageString()) logrus.Info("Redirecting to twitter...") if err := common.OpenFile(twitterURL); err != nil { logrus.Errorf("Failed to open HugoByte twitter with error %v", err) diff --git a/cli/commands/version/version.go b/cli/commands/version/version.go index de9a9df0..65c2b2b5 100644 --- a/cli/commands/version/version.go +++ b/cli/commands/version/version.go @@ -8,6 +8,7 @@ import ( "github.com/fatih/color" "github.com/hugobyte/dive/common" + "github.com/sirupsen/logrus" "github.com/spf13/cobra" ) @@ -17,6 +18,13 @@ var VersionCmd = &cobra.Command{ Short: "Prints the CLI version", Long: `Prints the current DIVE CLI version and warns if you are using an old version.`, Run: func(cmd *cobra.Command, args []string) { + common.ValidateCmdArgs(args, cmd.UsageString()) + + // Checks for latest Version + latestVersion := common.GetLatestVersion() + if common.DiveVersion != latestVersion { + logrus.Warnf("Update available '%s'. Get the latest version of our DIVE CLI for bug fixes, performance improvements, and new features.", latestVersion) + } version := color.New(color.Bold).Sprintf("CLI version - %s", common.DiveVersion) fmt.Println(version) diff --git a/cli/common/types.go b/cli/common/types.go index d7db6616..6adbf324 100644 --- a/cli/common/types.go +++ b/cli/common/types.go @@ -252,7 +252,7 @@ func (diveContext *DiveContext) GetSerializedData(response chan *kurtosis_core_r } else { diveContext.spinner.Stop() - diveContext.log.Fatalln("Starlark Run Failed", executionResponseLine.GetInstructionResult()) + diveContext.log.Fatalln("Starlark Run Failed") } } } @@ -260,3 +260,10 @@ func (diveContext *DiveContext) GetSerializedData(response chan *kurtosis_core_r return serializedOutputObj } + +func ValidateCmdArgs(args []string, cmd string) { + if len(args) != 0 { + logrus.Fatalf("Invalid Usage of command. Find cmd %s", cmd) + + } +} diff --git a/cli/go.mod b/cli/go.mod index 570f408c..cc4c91fb 100644 --- a/cli/go.mod +++ b/cli/go.mod @@ -3,6 +3,7 @@ module github.com/hugobyte/dive go 1.20 require ( + github.com/briandowns/spinner v1.23.0 github.com/fatih/color v1.15.0 github.com/google/go-github v17.0.0+incompatible github.com/kurtosis-tech/kurtosis/api/golang v0.80.8 @@ -13,27 +14,20 @@ require ( require ( github.com/Masterminds/semver/v3 v3.1.1 // indirect - github.com/briandowns/spinner v1.23.0 // indirect github.com/dsnet/compress v0.0.1 // indirect github.com/go-yaml/yaml v2.1.0+incompatible // indirect github.com/golang/protobuf v1.5.3 // indirect github.com/golang/snappy v0.0.4 // indirect github.com/google/go-querystring v1.1.0 // indirect - github.com/gosuri/uilive v0.0.4 // indirect - github.com/gosuri/uiprogress v0.0.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/kr/text v0.2.0 // indirect github.com/kurtosis-tech/kurtosis-portal/api/golang v0.0.0-20230328194643-b4dea3081e25 // indirect github.com/kurtosis-tech/kurtosis/grpc-file-transfer/golang v0.0.0-20230427135111-ee2492059d06 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.19 // indirect - github.com/mattn/go-runewidth v0.0.14 // indirect github.com/mholt/archiver v3.1.1+incompatible // indirect - github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect github.com/nwaples/rardecode v1.1.3 // indirect github.com/pierrec/lz4 v2.6.1+incompatible // indirect - github.com/rivo/uniseg v0.4.4 // indirect - github.com/schollz/progressbar/v3 v3.13.1 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/ulikunitz/xz v0.5.10 // indirect github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8 // indirect diff --git a/cli/go.sum b/cli/go.sum index c2141c21..c73706ef 100644 --- a/cli/go.sum +++ b/cli/go.sum @@ -65,14 +65,9 @@ github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+u github.com/google/go-querystring v1.1.0 h1:AnCroh3fv4ZBgVIf1Iwtovgjaw/GiKJo8M8yD/fhyJ8= github.com/google/go-querystring v1.1.0/go.mod h1:Kcdr2DB4koayq7X8pmAG4sNG59So17icRSOU623lUBU= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= -github.com/gosuri/uilive v0.0.4 h1:hUEBpQDj8D8jXgtCdBu7sWsy5sbW/5GhuO8KBwJ2jyY= -github.com/gosuri/uilive v0.0.4/go.mod h1:V/epo5LjjlDE5RJUcqx8dbw+zc93y5Ya3yg8tfZ74VI= -github.com/gosuri/uiprogress v0.0.1 h1:0kpv/XY/qTmFWl/SkaJykZXrBBzwwadmW8fRb7RJSxw= -github.com/gosuri/uiprogress v0.0.1/go.mod h1:C1RTYn4Sc7iEyf6j8ft5dyoZ4212h8G1ol9QQluh5+0= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8= github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw= -github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213/go.mod h1:vNUNkEQ1e29fT/6vq2aBdFsgNPmy8qMdSay1npru+Sw= github.com/klauspost/compress v1.4.1/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A= github.com/klauspost/cpuid v1.2.0/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek= github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= @@ -89,16 +84,10 @@ github.com/kurtosis-tech/stacktrace v0.0.0-20211028211901-1c67a77b5409/go.mod h1 github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= -github.com/mattn/go-isatty v0.0.17 h1:BTarxUcIeDqL27Mc+vyvdWYSL28zpIhv3RoTdsLMPng= -github.com/mattn/go-isatty v0.0.17/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= github.com/mattn/go-isatty v0.0.19 h1:JITubQf0MOLdlGRuRq+jtsDlekdYPia9ZFsB8h/APPA= github.com/mattn/go-isatty v0.0.19/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y= -github.com/mattn/go-runewidth v0.0.14 h1:+xnbZSEeDbOIg5/mE6JF0w6n9duR1l3/WmbinWVwUuU= -github.com/mattn/go-runewidth v0.0.14/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/mholt/archiver v3.1.1+incompatible h1:1dCVxuqs0dJseYEhi5pl7MYPH9zDa1wBi7mF09cbNkU= github.com/mholt/archiver v3.1.1+incompatible/go.mod h1:Dh2dOXnSdiLxRiPoVfIr/fI1TwETms9B8CTWfeh7ROU= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db h1:62I3jR2EmQ4l5rM/4FEfDWcRD+abF5XlKShorW5LRoQ= -github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db/go.mod h1:l0dey0ia/Uv7NcFFVbCLtqEBQbrT4OCwCSKTEv6enCw= github.com/nwaples/rardecode v1.1.3 h1:cWCaZwfM5H7nAD6PyEdcVnczzV8i/JtotnyW/dD9lEc= github.com/nwaples/rardecode v1.1.3/go.mod h1:5DzqNKiOdpKKBH87u8VlvAnPZMXcGRhxWkRpHbbfGS0= github.com/pierrec/lz4 v2.6.1+incompatible h1:9UY3+iC23yxF0UfGaYrGplQ+79Rg+h/q9FV9ix19jjM= @@ -106,14 +95,9 @@ github.com/pierrec/lz4 v2.6.1+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= -github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= -github.com/rivo/uniseg v0.4.4 h1:8TfxU8dW6PdqD27gjM8MVNuicgxIjxpm4K7x4jp8sis= -github.com/rivo/uniseg v0.4.4/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/schollz/progressbar/v3 v3.13.1 h1:o8rySDYiQ59Mwzy2FELeHY5ZARXZTVJC7iHD6PEFUiE= -github.com/schollz/progressbar/v3 v3.13.1/go.mod h1:xvrbki8kfT1fzWzBT/UZd9L6GA+jdL7HAgq2RFnO6fQ= github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ= github.com/spf13/cobra v1.7.0 h1:hyqWnYt1ZQShIddO5kBpj3vu05/++x6tJ6dg8EC572I= @@ -121,7 +105,6 @@ github.com/spf13/cobra v1.7.0/go.mod h1:uLxZILRyS/50WlhOIKD7W6V5bgeIt+4sICxh6uRM github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= -github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk= @@ -173,7 +156,6 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA= golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.6.0/go.mod h1:m6U89DPEgQRMq3DNkDClhWw02AUbt2daBVO4cn4Hv9U= golang.org/x/term v0.10.0 h1:3R7pNqamzBraeqj/Tj8qt1aQ2HpmlC+Cx/qL/7hn4/c= golang.org/x/term v0.10.0/go.mod h1:lpqdcUyK/oCiQxvxVrppt5ggO2KCZ5QblwqPnfZ6d5o= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/cli/main.go b/cli/main.go index 7e013dab..4a7ac27b 100644 --- a/cli/main.go +++ b/cli/main.go @@ -5,7 +5,6 @@ package main import ( "github.com/hugobyte/dive/commands" - "github.com/hugobyte/dive/common" "github.com/sirupsen/logrus" ) @@ -15,10 +14,7 @@ func main() { FullTimestamp: true, TimestampFormat: "2006-01-02 15:04:05", }) - latestVersion := common.GetLatestVersion() - if common.DiveVersion != latestVersion { - logrus.Warnf("Update available '%s'. Get the latest version of our DIVE CLI for bug fixes, performance improvements, and new features.", latestVersion) - } + commands.Execute() }