go: go.chromium.org/chromiumos/infra/go/internal/checkout Index | Files | Directories

package checkout

import "go.chromium.org/chromiumos/infra/go/internal/checkout"

Copyright 2019 The Chromium OS Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

Index

Package Files

checkout.go

Variables

var (
    RepoToolPath string = "repo"
)

type Checkout Uses

type Checkout interface {
    Initialize(root, manifestUrl string) error
    Manifest() repo.Manifest
    SetRepoToolPath(path string)
    SyncToManifest(path string) error
    ReadVersion() (repo.VersionInfo, error)
    AbsolutePath(args ...string) string
    AbsoluteProjectPath(project repo.Project, args ...string) string
    BranchExists(project repo.Project, pattern *regexp.Regexp) (bool, error)
    EnsureProject(project repo.Project) error
    GitRevision(project repo.Project) (string, error)
    RunGit(project repo.Project, cmd []string) (git.CommandOutput, error)
    BumpVersion(component repo.VersionComponent, branch, commitMsg string, dryRun, fetch bool) error
}

type CrosCheckout Uses

type CrosCheckout struct {
    // contains filtered or unexported fields
}

func (*CrosCheckout) AbsolutePath Uses

func (c *CrosCheckout) AbsolutePath(args ...string) string

AbsolutePath joins the path components with the repo root.

func (*CrosCheckout) AbsoluteProjectPath Uses

func (c *CrosCheckout) AbsoluteProjectPath(project repo.Project, args ...string) string

AbsoluteProjectPath joins the path components with the project's root.

func (*CrosCheckout) BranchExists Uses

func (c *CrosCheckout) BranchExists(project repo.Project, pattern *regexp.Regexp) (bool, error)

BranchExists determines if any branch exists in the specified project that matches the specified pattern.

func (*CrosCheckout) BumpVersion Uses

func (c *CrosCheckout) BumpVersion(
    component repo.VersionComponent, branch, commitMsg string, dryRun, fetch bool) error

BumpVersion increments the appropriate component of the version in chromeos_version.sh and commits it. If fetch is set, will fetch and checkout to the given branch.

func (*CrosCheckout) EnsureProject Uses

func (c *CrosCheckout) EnsureProject(project repo.Project) error

EnsureProject checks that the project exists in the checkout.

func (*CrosCheckout) GitRevision Uses

func (c *CrosCheckout) GitRevision(project repo.Project) (string, error)

GitRevision returns the project's current git revision on disk.

func (*CrosCheckout) Initialize Uses

func (c *CrosCheckout) Initialize(root, manifestUrl string) error

func (*CrosCheckout) Manifest Uses

func (c *CrosCheckout) Manifest() repo.Manifest

func (*CrosCheckout) ReadVersion Uses

func (c *CrosCheckout) ReadVersion() (repo.VersionInfo, error)

func (*CrosCheckout) RunGit Uses

func (c *CrosCheckout) RunGit(project repo.Project, cmd []string) (git.CommandOutput, error)

RunGit runs the specified git command in the project dir.

func (*CrosCheckout) SetRepoToolPath Uses

func (c *CrosCheckout) SetRepoToolPath(path string)

func (*CrosCheckout) SyncToManifest Uses

func (c *CrosCheckout) SyncToManifest(path string) error

Directories

PathSynopsis
mockPackage mock_checkout is a generated GoMock package.

Package checkout imports 11 packages (graph). Updated 2019-07-18. Refresh now. Tools for package owners.