cosmosver

package
v29.0.0-...-a2903dc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	StargateFortyVersion          = newVersion("0.40.0")
	StargateFortyFourVersion      = newVersion("0.44.0-alpha")
	StargateFortyFiveThreeVersion = newVersion("0.45.3")
	StargateFortySevenTwoVersion  = newVersion("0.47.2")
	StargateFiftyVersion          = newVersion("0.50.1") // 0.50.0 has been retracted and should not be used
)
View Source
var (
	// Versions is a list of known, sorted Cosmos-SDK versions.
	Versions = []Version{
		StargateFortyVersion,
		StargateFortyFourVersion,
		StargateFortyFiveThreeVersion,
		StargateFortySevenTwoVersion,
	}

	// Latest is the latest known version of the Cosmos-SDK.
	Latest = Versions[len(Versions)-1]
)
View Source
var (
	// CosmosSDKRepoName defines the name of the Cosmos SDK repository.
	CosmosSDKRepoName = "cosmos-sdk"
	// CosmosModulePath defines Cosmos SDK import path.
	CosmosModulePath = "github.com/cosmos/cosmos-sdk"
	// CosmosSDKModulePathPattern defines a regexp pattern for Cosmos SDK import path.
	CosmosSDKModulePathPattern = regexp.MustCompile(CosmosSDKRepoName + "$")
)

Functions

This section is empty.

Types

type Version

type Version struct {
	// Version is the exact sdk version string.
	Version string

	// Semantic is the parsed version.
	Semantic semver.Version
}

Version represents a range of Cosmos SDK versions.

func Detect

func Detect(appPath string) (version Version, err error)

Detect detects major version of Cosmos SDK. If the Cosmos SDK is replaced with a fork, it returns the version of the fork. If the Cosmos SDK is replaced with a local fork, it returns its non resolved version.

func Parse

func Parse(version string) (v Version, err error)

Parse parses a Cosmos-SDK version.

func (Version) GTE

func (v Version) GTE(version Version) bool

GTE checks if v is greater than or equal to version.

func (Version) Is

func (v Version) Is(version Version) bool

Is checks if v is equal to version.

func (Version) LT

func (v Version) LT(version Version) bool

LT checks if v is less than version.

func (Version) LTE

func (v Version) LTE(version Version) bool

LTE checks if v is less than or equal to version.

func (Version) String

func (v Version) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL