newtutil

package
v0.0.0-...-56472e5 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION_STABILITY_NONE   = ""
	VERSION_STABILITY_STABLE = "stable"
	VERSION_STABILITY_DEV    = "dev"
	VERSION_STABILITY_LATEST = "latest"

	// "commit" is not actually a stability, but it takes the place of one in
	// the repo version notation.  The "commit" string indicates a commit hash,
	// tag, or branch, rather than a version specifier.
	VERSION_STABILITY_COMMIT = "commit"
)
View Source
const ARDUINO_ZERO_REPO_NAME string = "mynewt_arduino_zero"
View Source
const CORE_REPO_NAME string = "apache-mynewt-core"
View Source
const VERSION_FLOATING = -1

Represents an unspecified part in a version. For example, in "1-latest", the minor and revision parts are floating.

Variables

View Source
var NewtAsk bool
View Source
var NewtBlinkyTag string = "master"
View Source
var NewtDate = "unknown"
View Source
var NewtForce bool
View Source
var NewtGitHash = "unknown"
View Source
var NewtNumJobs int
View Source
var NewtVersion = Version{1, 9, 9900}
View Source
var NewtVersionStr = "1.10.0-dev"

Functions

func BuildPackageString

func BuildPackageString(repoName string, pkgName string) string

func CompareRepoVersions

func CompareRepoVersions(v1 RepoVersion, v2 RepoVersion) int

func FindRepoDesignator

func FindRepoDesignator(s string) (int, int)

func GeneratedPreamble

func GeneratedPreamble() string

func MakeTempRepoDir

func MakeTempRepoDir() (string, error)

Creates a temporary directory for downloading a repo.

func ParsePackageString

func ParsePackageString(pkgStr string) (string, string, error)

Parses a string of the following form:

[@repo]<path/to/package>

@return string repo name ("" if no repo)

string               package name
error                if invalid package string

func PrintNewtVersion

func PrintNewtVersion()

func ProjRelPath

func ProjRelPath(path string) string

func ReplaceRepoDesignators

func ReplaceRepoDesignators(s string) (string, bool)

func SortVersions

func SortVersions(vers []RepoVersion)

func VerCmp

func VerCmp(v1 Version, v2 Version) int64

Types

type RepoVersion

type RepoVersion struct {
	Major     int64
	Minor     int64
	Revision  int64
	Stability string
	Commit    string
}

func ParseRepoVersion

func ParseRepoVersion(verStr string) (RepoVersion, error)

func SortedVersions

func SortedVersions(vers []RepoVersion) []RepoVersion

func SortedVersionsDesc

func SortedVersionsDesc(vers []RepoVersion) []RepoVersion

func (*RepoVersion) IsNormalized

func (v *RepoVersion) IsNormalized() bool

func (*RepoVersion) String

func (ver *RepoVersion) String() string

func (*RepoVersion) ToNuVersion

func (ver *RepoVersion) ToNuVersion() Version

type Version

type Version struct {
	Major    int64
	Minor    int64
	Revision int64
}

func ParseVersion

func ParseVersion(s string) (Version, error)

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