binariesbuilder

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BinariesDir defines path to store built siad binaries.
	BinariesDir = "../upgrade-binaries"
)

Variables

View Source
var StaticBuilder builder

StaticBuilder defines a struct with methods to build different siad binary versions for multiple tests. Versions used by multiple tests are build first.

Functions

func ExcludeVersions

func ExcludeVersions(versions, excludeVersions []string) []string

ExcludeVersions takes as an input a slice of versions to be filtered and a slice of versions which should be excluded from the first slice. It returns a slice of versions without excluded versions.

func GetReleases

func GetReleases(minVersion string) ([]string, error)

GetReleases returns slice of git tags of Sia Gitlab releases greater than or equal to the given minimal version in ascending semantic version order. If there is a patch tagged with "-antfarm" suffix for a Sia release, patch tag instead release tag is added to the return slice. NOTE: These patches are ONLY to enable the Sia Antfarm to run and are not intended to address any underlying bugs in siad.

func ReleasesWithMaxVersion

func ReleasesWithMaxVersion(releases []string, maxVersion string) []string

ReleasesWithMaxVersion returns releases that satisfy the given maximal version.

func ReleasesWithMinVersion

func ReleasesWithMinVersion(releases []string, minVersion string) []string

ReleasesWithMinVersion returns releases that satisfy the given minimal version.

func SiadBinaryPath

func SiadBinaryPath(version string) string

SiadBinaryPath returns built siad-dev binary path from the given Sia version.

Types

type Command

type Command struct {
	// Specific environment variables to set
	EnvVars map[string]string
	// Name of the command
	Name string
	// Command's subcommands or arguments
	Args []string
	// Working directory. Keep unset (empty string) to use default caller
	// working directory
	Dir string
}

Command defines a struct for parameters to call execute method.

func (Command) Execute

func (c Command) Execute(logger *persist.Logger) (string, error)

Execute executes a given shell command defined by command receiver. Command struct is used instead of passing the whole command as a string and parsing string arguments because parsing arguments containing spaces would make the parsing much complex.

Jump to

Keyboard shortcuts

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