repo

package
v0.0.0-...-113f7ca Latest Latest
Warning

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

Go to latest
Published: May 4, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddCommit

func AddCommit(repo SDKRepository, newVersion string) error

func ContainsPackage

func ContainsPackage(root, readme, tag string) (autorest.GenerationMetadata, bool)

func GetForkRemote

func GetForkRemote(repo WorkTree) (forkRemote *git.Remote, err error)

func GetLatestVersion

func GetLatestVersion(wt SDKRepository) (*semver.Version, error)

func GetPackagesReportFromContent

func GetPackagesReportFromContent(lhs RepoContent, targetRoot string) (*report.PkgsReport, error)

func GetPkgsReport

func GetPkgsReport(lhs, rhs RepoContent, option *report.GenerationOption) report.PkgsReport

GetPkgsReport generates a PkgsReport based on the delta between lhs and rhs

func GetRemoteUserName

func GetRemoteUserName(remote *git.Remote) string

GetRemoteUserName https://github.com/githubName/azure-sdk-for-go.git

func GetVersion

func GetVersion(content string) (*semver.Version, error)

func IsNothingToCommit

func IsNothingToCommit(err error) bool

func ModifyVersionFile

func ModifyVersionFile(absSDK, lastVersion, newVersion string) error

func ReleaseTitle

func ReleaseTitle(branchName string) string

func TempDir

func TempDir() string

Types

type Branch

type Branch config.Branch

type CheckoutOptions

type CheckoutOptions git.CheckoutOptions

type CommandContext

type CommandContext interface {
	SDK() SDKRepository
	Spec() SpecRepository
	CreateReleaseBranch(version string) (string, error)
	CheckExternalChanges()
}

func NewCommandContext

func NewCommandContext(sdkPath, specPath string, panicWhenDetectExternalChanges bool) (CommandContext, error)

type NothingToCommit

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

func (*NothingToCommit) Error

func (n *NothingToCommit) Error() string

type RepoContent

type RepoContent map[string]exports.Content

func GetRepoContent

func GetRepoContent(sdkRoot string) (RepoContent, error)

func (*RepoContent) Print

func (r *RepoContent) Print(o io.Writer) error

Print prints the RepoContent to a Writer as JSON string

type RepositoryWithChangelog

type RepositoryWithChangelog interface {
	ReportForCommit(commit string) (RepoContent, error)
}

type SDKRepository

type SDKRepository interface {
	WorkTree
	RepositoryWithChangelog
	CreateReleaseBranch(releaseBranchName string) error
	AddReleaseCommit(rpName, namespaceName, specHash, version string) error
}

func CloneSDKRepository

func CloneSDKRepository(repoUrl, commitID string) (SDKRepository, error)

func OpenSDKRepository

func OpenSDKRepository(path string) (SDKRepository, error)

type SpecRepository

type SpecRepository interface {
	WorkTree
	LastHead() *plumbing.Reference
}

func CloneSpecRepository

func CloneSpecRepository(repoUrl, commitID string) (SpecRepository, error)

func OpenSpecRepository

func OpenSpecRepository(path string) (SpecRepository, error)

type WorkTree

type WorkTree interface {
	Root() string
	Add(path string) error
	Commit(message string) error
	Checkout(opt *CheckoutOptions) error
	CheckoutTag(tag string) error
	CreateBranch(branch *Branch) error
	DeleteBranch(name string) error
	CherryPick(commit string) error
	Stash() error
	StashPop() error
	Head() (*plumbing.Reference, error)
	Tags() (storer.ReferenceIter, error)
	Remotes() ([]*git.Remote, error)
	DeleteRemote(name string) error
	CreateRemote(c *config.RemoteConfig) (*git.Remote, error)
	Fetch(o *git.FetchOptions) error
}

func CloneWorkTree

func CloneWorkTree(repoURL, workingPath string) (WorkTree, error)

func NewWorkTree

func NewWorkTree(path string) (WorkTree, error)

Jump to

Keyboard shortcuts

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