versions

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Overview

Package versions contains functions to parse and sort Bazel version identifier.

Index

Constants

View Source
const (
	// BazelUpstream contains the name of the official Bazel GitHub organization.
	BazelUpstream = "bazelbuild"
)

Variables

This section is empty.

Functions

func GetInAscendingOrder

func GetInAscendingOrder(versions []string) []string

GetInAscendingOrder returns the given versions sorted in ascending order.

func IsCommit added in v1.14.1

func IsCommit(version string) bool

IsCommit returns whether the given version refers to a commit.

func MatchCommitPattern added in v1.22.0

func MatchCommitPattern(version string) bool

Types

type Info

type Info struct {
	MustBeRelease, MustBeCandidate bool
	IsLTS, IsRolling               bool
	IsCommit, IsFork, IsRelative   bool
	Fork, Value                    string
	LatestOffset, TrackRestriction int
}

Info represents a structured Bazel version identifier.

func Parse

func Parse(fork, version string) (*Info, error)

Parse extracts and returns structured information about the given Bazel version label.

Jump to

Keyboard shortcuts

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