Merge branch 'v2.1.x' into develop

This commit is contained in:
Puskar Basu
2025-07-08 10:46:14 +05:30
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -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)

View File

@@ -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"`