parent

package
v0.0.0-...-1b86ce5 Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: BSD-3-Clause Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FtReadmePath is the path to the FreeType readme file.
	FtReadmePath = "third_party/freetype/README.chromium"

	// FtIncludeSrc is the includes directory in the child repo.
	FtIncludeSrc = "include"
	// FtIncludeDest is the includes directory in the parent repo.
	FtIncludeDest = "third_party/freetype/include/freetype-custom"
)
View Source
const (
	GClient = "gclient.py"
)

Variables

View Source
var (

	// FtIncludesToMerge are header files which should be merged when rolling.
	FtIncludesToMerge = []string{
		"freetype/config/ftoption.h",
		"freetype/config/public-macros.h",
	}
)
View Source
var (
	// REGitHubForkRepoURL is a regular expression which matches a GitHub fork
	// repo URL.
	REGitHubForkRepoURL = regexp.MustCompile(`^(git@github.com:|file:///)(.*)/(.*?)(\.git)?$`)
)

Functions

func ANGLECodeGeneration

func ANGLECodeGeneration(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

ANGLECodeGeneration runs the ANGLE code generation script.

func ANGLERollChromium

func ANGLERollChromium(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

ANGLERollChromium runs the ANGLE roll_chromium_deps.py script.

func AddPreUploadStepForTesting

func AddPreUploadStepForTesting(s PreUploadStep) config.PreUploadStep

AddPreUploadStepForTesting adds the given PreUploadStep to the global registry to be used for testing. Returns a unique name for the step. Not safe to be used concurrently with GetPreUploadStep(s).

func AngleGnToBp

func AngleGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

AngleGnToBp runs Angle's scripts to roll into Android.

func ApplyExternalChangeGithubFunc

func ApplyExternalChangeGithubFunc() git_common.ApplyExternalChangeFunc

ApplyExternalChangeGithubFunc returns a ApplyExternalChangeFunc which handles external change Ids for github checkouts.

func ChromiumRollWebGPUCTS

func ChromiumRollWebGPUCTS(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

ChromiumRollWebGPUCTS updates the list of Typescript sources used to compile the CTS, and it regenerates the list of WPT variants.

func CreateNewGerritRoll

func CreateNewGerritRoll(ctx context.Context, g gerrit.GerritInterface, project, branch, commitMsg, baseCommit string, changes map[string]string, emails []string, dryRun bool) (int64, error)

CreateNewGerritRoll uploads a Gerrit CL with the given changes and returns the issue number or any error which occurred.

func FlutterLicenseScripts

func FlutterLicenseScripts(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

FlutterLicenseScripts runs the flutter license scripts as described in https://bugs.chromium.org/p/skia/issues/detail?id=7730#c6 and in https://github.com/flutter/engine/blob/master/tools/licenses/README.md

func FlutterLicenseScriptsForDart

func FlutterLicenseScriptsForDart(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

FlutterLicenseScriptsForDart runs the flutter license scripts for dart.

func FlutterLicenseScriptsForFuchsia

func FlutterLicenseScriptsForFuchsia(ctx context.Context, _ []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

FlutterLicenseScriptsForFuchsia runs the flutter license scripts for fuchsia.

func GenericPreUploadStep

func GenericPreUploadStep(ctx context.Context, cfg *config.PreUploadConfig, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

GenericPreUploadStep runs a pre-upload step as specified by the given config.

func GetDEPSCheckoutPath

func GetDEPSCheckoutPath(c *config.DEPSLocalParentConfig, workdir string) (string, error)

GetDEPSCheckoutPath returns the path to the checkout within the workdir, using the given DEPSLocalConfig.

func GitCheckoutUploadGerritRollFunc

func GitCheckoutUploadGerritRollFunc(g gerrit.GerritInterface) git_common.UploadRollFunc

GitCheckoutUploadGerritRollFunc returns a GitCheckoutUploadRollFunc which uploads a CL to Gerrit.

func GitCheckoutUploadGithubRollFunc

func GitCheckoutUploadGithubRollFunc(githubClient *github.GitHub, userName, rollerName, forkRepoURL string) git_common.UploadRollFunc

GitCheckoutUploadGithubRollFunc returns a UploadRollFunc which uploads a CL to Github.

func GoGenerateCipd

func GoGenerateCipd(ctx context.Context, _ []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

GoGenerateCipd runs "go generate" in go/cipd.

func NewCopy

func NewCopy(ctx context.Context, cfg *config.CopyParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, userName, userEmail string, dep child.Child) (*gitilesParent, error)

NewCopy returns a Parent implementation which copies the Child into itself. It uses a local git checkout and uploads changes to Gerrit.

func NewFreeTypeParent

func NewFreeTypeParent(ctx context.Context, c *config.FreeTypeParentConfig, reg *config_vars.Registry, workdir string, client *http.Client, serverURL string) (*gitilesParent, error)

NewFreeTypeParent returns a Parent instance which rolls FreeType.

func NewGitilesFile

func NewGitilesFile(ctx context.Context, c *config.GitilesParentConfig, reg *config_vars.Registry, client *http.Client, serverURL string) (*gitilesParent, error)

NewGitilesFile returns a Parent implementation which uses Gitiles to roll a dependency.

func NewGoModGerritParent

func NewGoModGerritParent(ctx context.Context, c *config.GoModGerritParentConfig, reg *config_vars.Registry, client *http.Client, workdir string, cr codereview.CodeReview) (*goModParent, error)

NewGoModGerritParent returns a Parent which updates go.mod and uploads CLs to Gerrit.

func NewGoModParent

func NewGoModParent(ctx context.Context, c *config.GoModParentConfig, reg *config_vars.Registry, client *http.Client, workdir string, cr codereview.CodeReview, uploadRoll autoroll_git_common.UploadRollFunc) (*goModParent, error)

NewGoModParent returns a Parent which updates go.mod.

func SkiaGnToBp

func SkiaGnToBp(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

SkiaGnToBp runs Skia's gn_to_bp.py script to roll into Android.

func TrainInfra

func TrainInfra(ctx context.Context, env []string, client *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

TrainInfra trains the infra expectations.

func UpdateBoringSSL

func UpdateBoringSSL(ctx context.Context, env []string, client *http.Client, parentRepoDir string, _, _ *revision.Revision) error

UpdateBoringSSL runs a script to generate files for BoringSSL.

func UpdateFlutterDepsForDart

func UpdateFlutterDepsForDart(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

UpdateFlutterDepsForDart runs the create_updated_flutter_deps.py for Dart in Flutter. See https://bugs.chromium.org/p/skia/issues/detail?id=8437#c18 and https://bugs.chromium.org/p/skia/issues/detail?id=8437#c21 for context.

func VulkanDepsUpdateCommitMessage

func VulkanDepsUpdateCommitMessage(ctx context.Context, env []string, _ *http.Client, parentRepoDir string, from *revision.Revision, to *revision.Revision) error

VulkanDepsUpdateCommitMessage runs a script to produce a more usful commit message.

Types

type GitCheckoutParent

type GitCheckoutParent struct {
	*git_common.Checkout
	// contains filtered or unexported fields
}

GitCheckoutParent is a base for implementations of Parent which use a local Git checkout.

func NewDEPSLocal

func NewDEPSLocal(ctx context.Context, c *config.DEPSLocalParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, recipeCfgFile string, cr codereview.CodeReview, uploadRoll autoroll_git_common.UploadRollFunc, applyExternalChangeFunc autoroll_git_common.ApplyExternalChangeFunc) (*GitCheckoutParent, error)

NewDEPSLocal returns a Parent which uses a local checkout and DEPS to manage dependencies.

func NewDEPSLocalGerrit

func NewDEPSLocalGerrit(ctx context.Context, c *config.DEPSLocalGerritParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName, recipeCfgFile string, cr codereview.CodeReview) (*GitCheckoutParent, error)

NewDEPSLocalGerrit returns a DEPSLocal parent which creates CLs in Gerrit.

func NewDEPSLocalGitHub

func NewDEPSLocalGitHub(ctx context.Context, c *config.DEPSLocalGitHubParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName, recipeCfgFile string, cr codereview.CodeReview) (*GitCheckoutParent, error)

NewDEPSLocalGitHub returns a DEPSLocal parent which creates GitHub pull requests.

func NewGitCheckout

NewGitCheckout returns a base for implementations of Parent which use a local checkout to create changes.

func NewGitCheckoutGithub

func NewGitCheckoutGithub(ctx context.Context, c *config.GitCheckoutGitHubParentConfig, reg *config_vars.Registry, serverURL, workdir, rollerName string, cr codereview.CodeReview, createRoll git_common.CreateRollFunc) (*GitCheckoutParent, error)

NewGitCheckoutGithub returns an implementation of Parent which uses a local git checkout and uploads pull requests to Github.

func NewGitCheckoutGithubFile

func NewGitCheckoutGithubFile(ctx context.Context, c *config.GitCheckoutGitHubFileParentConfig, reg *config_vars.Registry, client *http.Client, serverURL, workdir, rollerName string, cr codereview.CodeReview) (*GitCheckoutParent, error)

NewGitCheckoutGithubFile returns a Parent which uses a local checkout and a version file (eg. DEPS) to manage dependencies.

func (*GitCheckoutParent) CreateNewRoll

func (p *GitCheckoutParent) CreateNewRoll(ctx context.Context, from, to *revision.Revision, rolling []*revision.Revision, emails []string, dryRun bool, commitMsg string) (int64, error)

CreateNewRoll implements Parent.

func (*GitCheckoutParent) Update

func (p *GitCheckoutParent) Update(ctx context.Context) (string, error)

Update implements Parent.

type Parent

type Parent interface {
	// Update returns the pinned version of the dependency at the most
	// recent revision of the Parent. For implementations which use local
	// checkouts, this implies a sync.
	Update(context.Context) (string, error)

	// CreateNewRoll uploads a CL which updates the pinned version of the
	// dependency to the given Revision.
	CreateNewRoll(ctx context.Context, from, to *revision.Revision, rolling []*revision.Revision, emails []string, dryRun bool, commitMsg string) (int64, error)
}

Parent represents a git repo (or other destination) which depends on a Child and is capable of producing rolls.

type PreUploadStep

PreUploadStep is a function to be run after the roll is performed but before a CL is uploaded. The string slice parameter is the set of environment variables which should be used by the pre-upload step. The http.Client should be authenticated. The string parameter is the absolute path to the directory of the parent repo.

func GetGenericPreUploadStep

func GetGenericPreUploadStep(cfg *config.PreUploadConfig) PreUploadStep

GetGenericPreUploadStep returns the generic pre-upload step using the given config.

func GetPreUploadStep

func GetPreUploadStep(s config.PreUploadStep) (PreUploadStep, error)

GetPreUploadStep returns the PreUploadStep with the given name.

func GetPreUploadSteps

func GetPreUploadSteps(steps []config.PreUploadStep, generic *config.PreUploadConfig) ([]PreUploadStep, error)

GetPreUploadSteps returns the PreUploadSteps with the given names.

Jump to

Keyboard shortcuts

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