C# 클래스 SimpleGitVersion.RepositoryInfo

Immutable object that can be obtained by calling RepositoryInfo.LoadFromPath(string, RepositoryInfoOptions) that describes the commit and all the CSemVer information.
파일 보기 프로젝트 열기: SimpleGitVersion/SGV-Net 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
CIRelease CIReleaseInfo
CommitDateUtc System.DateTime
CommitSha string
CurrentUserName string
ExistingVersions IReadOnlyList
GitSolutionDirectory string
IsDirtyExplanations string
Options SimpleGitVersion.RepositoryInfoOptions
PossibleVersions IReadOnlyList
PossibleVersionsStrict IReadOnlyList
PreviousMaxRelease ITagCommit
PreviousRelease ITagCommit
ReleaseTagErrorLines IReadOnlyList
ReleaseTagErrorText string
ReleaseTagIsNotPossibleError bool
RepositoryError string
ValidReleaseTag ReleaseTagVersion

공개 메소드들

메소드 설명
LoadFromPath ( string path, RepositoryInfoOptions>.Func optionsBuilder ) : RepositoryInfo

Creates a new RepositoryInfo based on a path (that can be below the folder with the '.git' sub folder) and a function that can create a RepositoryInfoOptions from the actual Git repository path.

LoadFromPath ( string path, SimpleGitVersion.RepositoryInfoOptions options = null ) : RepositoryInfo

Creates a new RepositoryInfo based on a path (that can be below the folder with the '.git' sub folder).

비공개 메소드들

메소드 설명
ComputeIsDirty ( Repository r, Commit commit, SimpleGitVersion.RepositoryInfoOptions options ) : string
RepositoryInfo ( ) : System
RepositoryInfo ( Repository r, SimpleGitVersion.RepositoryInfoOptions options, string gitSolutionDir ) : System
SetError ( StringBuilder errors, IReadOnlyList &lines, string &text ) : void
TryFindCommit ( SimpleGitVersion.RepositoryInfoOptions options, Repository r, Commit &commit, CIBranchVersionMode &ciVersionMode, string &branchNameForCIVersion ) : string

메소드 상세

LoadFromPath() 공개 정적인 메소드

Creates a new RepositoryInfo based on a path (that can be below the folder with the '.git' sub folder) and a function that can create a RepositoryInfoOptions from the actual Git repository path.
public static LoadFromPath ( string path, RepositoryInfoOptions>.Func optionsBuilder ) : RepositoryInfo
path string The path to lookup.
optionsBuilder RepositoryInfoOptions>.Func Function that can create a from the Git working directory (the Solution folder).
리턴 RepositoryInfo

LoadFromPath() 공개 정적인 메소드

Creates a new RepositoryInfo based on a path (that can be below the folder with the '.git' sub folder).
public static LoadFromPath ( string path, SimpleGitVersion.RepositoryInfoOptions options = null ) : RepositoryInfo
path string The path to lookup.
options SimpleGitVersion.RepositoryInfoOptions Optional .
리턴 RepositoryInfo

프로퍼티 상세

CIRelease 공개적으로 프로퍼티

Gets CI informations if a CI release must be done. Not null only if we are on a branch that is enabled in RepositoryInfoOptions.Branches (either because it is the current branch or RepositoryInfoOptions.StartingBranchName specifies it), the RepositoryInfoOptions.StartingCommitSha is null or empty and there is no ValidReleaseTag on the commit.
public CIReleaseInfo,SimpleGitVersion CIRelease
리턴 CIReleaseInfo

CommitDateUtc 공개적으로 프로퍼티

The UTC date and time of the commit.
public DateTime,System CommitDateUtc
리턴 System.DateTime

CommitSha 공개적으로 프로퍼티

The Sha of the commit.
public string CommitSha
리턴 string

CurrentUserName 공개적으로 프로퍼티

The current user name.
public string CurrentUserName
리턴 string

ExistingVersions 공개적으로 프로퍼티

Gets the existing versions in the repository in ascending order. Null if there is a RepositoryError or a ReleaseTagErrorText that prevented its computation.
public IReadOnlyList ExistingVersions
리턴 IReadOnlyList

GitSolutionDirectory 공개적으로 프로퍼티

Gets the solution directory: the one that contains the .git folder. Null only if RepositoryError is 'No Git repository.'. It ends with the Path.DirectorySeparatorChar.
public string GitSolutionDirectory
리턴 string

IsDirtyExplanations 공개적으로 프로퍼티

Gets detailed explanations about IsDirty.
public string IsDirtyExplanations
리턴 string

Options 공개적으로 프로퍼티

Gets the RepositoryInfoOptions that has been used.
public RepositoryInfoOptions,SimpleGitVersion Options
리턴 SimpleGitVersion.RepositoryInfoOptions

PossibleVersions 공개적으로 프로퍼티

Null if there is a RepositoryError or a ReleaseTagErrorText that prevented its computation. When empty, this means that there can not be a valid release tag on the current commit point.
public IReadOnlyList PossibleVersions
리턴 IReadOnlyList

PossibleVersionsStrict 공개적으로 프로퍼티

Gets the possible versions on this commit in a strict sense: this is a subset of the PossibleVersions. A possible versions that is not a ReleaseTagVersion.IsPatch do not appear here if a greater version exists in the repository. Null if there is a RepositoryError or a ReleaseTagErrorText that prevented its computation.
public IReadOnlyList PossibleVersionsStrict
리턴 IReadOnlyList

PreviousMaxRelease 공개적으로 프로퍼티

Null if there is a RepositoryError or a ReleaseTagErrorText that prevented its computation. Can also be null if there is simply no previous release: the PossibleVersions are then based on ReleaseTagVersion.FirstPossibleVersions.
public ITagCommit PreviousMaxRelease
리턴 ITagCommit

PreviousRelease 공개적으로 프로퍼티

Null if there is a RepositoryError or a ReleaseTagErrorText that prevented its computation. Can also be null if there is simply no previous release.
public ITagCommit PreviousRelease
리턴 ITagCommit

ReleaseTagErrorLines 공개적으로 프로퍼티

Gets the errors related to the release tags as a list of lines. Null if no errors.
public IReadOnlyList ReleaseTagErrorLines
리턴 IReadOnlyList

ReleaseTagErrorText 공개적으로 프로퍼티

Gets the errors related to the release tags as a text. Null if no errors.
public string ReleaseTagErrorText
리턴 string

ReleaseTagIsNotPossibleError 공개적으로 프로퍼티

Gets whether the error is the fact that the release tag on the current commit point is not one of the PossibleVersions. An error that describes this appears in ReleaseTagErrorLines and ReleaseTagErrorText
public bool ReleaseTagIsNotPossibleError
리턴 bool

RepositoryError 공개적으로 프로퍼티

Gets the repository level error if any: it is one line of text or null ('No Git repository.' or 'Unitialized Git repository.').
public string RepositoryError
리턴 string

ValidReleaseTag 공개적으로 프로퍼티

Gets the release tag. If there is error, this is null. It is also null if there is actually no release tag on the current commit.
public ReleaseTagVersion,SimpleGitVersion ValidReleaseTag
리턴 ReleaseTagVersion