Documentation
¶
Index ¶
- type GitClient
- func (g *GitClient) CreateAnnotatedTag(version, message string) error
- func (g *GitClient) CreateTag(version string) error
- func (g *GitClient) GetAllTags() ([]string, error)
- func (g *GitClient) GetRemoteName() (string, error)
- func (g *GitClient) GetRemoteURL() (string, error)
- func (g *GitClient) GetTagsWithDates() ([]TagInfo, error)
- func (g *GitClient) HasRemote() (bool, error)
- func (g *GitClient) HasUncommittedChanges() (bool, error)
- func (g *GitClient) IsGitRepository() (bool, error)
- func (g *GitClient) PushTag(version string) error
- func (g *GitClient) TagExists(tag string) (bool, error)
- type TagInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GitClient ¶
type GitClient struct {
// contains filtered or unexported fields
}
GitClient 封装 Git 操作
func (*GitClient) CreateAnnotatedTag ¶
CreateAnnotatedTag 创建 annotated tag
func (*GitClient) GetAllTags ¶
GetAllTags 获取所有 tags
func (*GitClient) GetRemoteName ¶
GetRemoteName 获取远程仓库名称(优先返回 origin)
func (*GitClient) GetRemoteURL ¶ added in v0.1.0
GetRemoteURL 获取远程仓库的 URL
func (*GitClient) GetTagsWithDates ¶
GetTagsWithDates 获取所有 tags 及其创建日期
func (*GitClient) HasUncommittedChanges ¶
HasUncommittedChanges 检查是否有未提交的修改
func (*GitClient) IsGitRepository ¶
IsGitRepository 检查当前目录是否在 git 仓库中
Click to show internal directories.
Click to hide internal directories.