utils

package
v3.3.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// ErrNothingToCommit is a specific error that should not stop the global process of drivers update
	ErrNothingToCommit = errors.NewKind(errSpecialText)
)

Functions

func ExecCmd

func ExecCmd(command string) error

ExecCmd executes the specified Bash script. If execution fails, the error contains the combined output from stdout and stderr of the script. Do not use this for scripts that produce a large volume of output.

func PrepareBranch

func PrepareBranch(d discovery.Driver, githubToken string, o *UpdateOptions) error

PrepareBranch does the next steps: 1) clones driver's master branch 2) creates new branch 3) executes custom script if it's not empty 4) updates SDK version if it's not empty 5) commits and pushes changes to the previously created branch

func PreparePR

func PreparePR(d discovery.Driver, githubToken string, pr PRInfo, dryRun bool) error

PreparePR creates pull request for a given driver's branch

Types

type PRInfo added in v3.2.5

type PRInfo struct {
	Branch string // required
	Title  string
	Text   string
}

type UpdateOptions

type UpdateOptions struct {
	Branch              string
	SDKVersion          string
	Script              string
	CommitMsg           string
	Dockerfile          bool
	ExplicitCredentials bool
	DryRun              bool
}

UpdateOptions represents git metadata for changes and ways of execution of update script

Jump to

Keyboard shortcuts

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