mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-19 18:12:43 -05:00
Merge branch 'v2.1.x' into develop
This commit is contained in:
@@ -9,6 +9,7 @@ import (
|
||||
"github.com/Masterminds/semver/v3"
|
||||
"github.com/fatih/color"
|
||||
"github.com/olekukonko/tablewriter"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/turbot/pipe-fittings/v2/constants"
|
||||
"github.com/turbot/pipe-fittings/v2/plugin"
|
||||
"github.com/turbot/pipe-fittings/v2/utils"
|
||||
@@ -61,6 +62,9 @@ func (av *AvailableVersionCache) buildNotification(ctx context.Context) ([]strin
|
||||
}
|
||||
|
||||
func (av *AvailableVersionCache) cliNotificationMessage() ([]string, error) {
|
||||
// the current version of the Steampipe CLI application
|
||||
currentVer := viper.GetString("main.version")
|
||||
|
||||
info := av.CliCache
|
||||
if info == nil {
|
||||
return nil, nil
|
||||
@@ -75,7 +79,7 @@ func (av *AvailableVersionCache) cliNotificationMessage() ([]string, error) {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
currentVersion, err := semver.NewVersion(currentVersion)
|
||||
currentVersion, err := semver.NewVersion(currentVer)
|
||||
if err != nil {
|
||||
fmt.Println(fmt.Errorf("there's something wrong with the Current Version"))
|
||||
fmt.Println(err)
|
||||
|
||||
@@ -9,14 +9,10 @@ import (
|
||||
"time"
|
||||
|
||||
"github.com/go-git/go-git/v5/plumbing/transport/http"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/turbot/pipe-fittings/v2/app_specific"
|
||||
"github.com/turbot/pipe-fittings/v2/utils"
|
||||
)
|
||||
|
||||
// the current version of the Steampipe CLI application
|
||||
var currentVersion = viper.GetString("main.version")
|
||||
|
||||
type CLIVersionCheckResponse struct {
|
||||
NewVersion string `json:"latest_version,omitempty"` // `json:"current_version"`
|
||||
DownloadURL string `json:"download_url,omitempty"` // `json:"download_url"`
|
||||
|
||||
Reference in New Issue
Block a user