Documentation ¶
Index ¶
- Constants
- Variables
- func CallWithTTY(name string, args ...string) error
- func RandomString() string
- type ChangeLogEntry
- type GSCChangeLog
- func (cl *GSCChangeLog) AddEntry(entry *ChangeLogEntry)
- func (cl *GSCChangeLog) GetAll() []*ChangeLogEntry
- func (cl *GSCChangeLog) GetFilename() string
- func (cl *GSCChangeLog) GetLatest() *ChangeLogEntry
- func (cl *GSCChangeLog) GetWIP() (*ChangeLogEntry, error)
- func (cl *GSCChangeLog) Render() string
- func (cl *GSCChangeLog) UpdateWIP(entry *ChangeLogEntry)
- func (cl *GSCChangeLog) Write() error
- type GSCProjectInfo
- type GSCProjectStatus
- type GSCRevisionLog
- type GSCUtils
- type GitCaller
- type GitPkgRepo
- type LogEntry
- type OSCUser
Constants ¶
const CHLOG_SEP = "-------------------------------------------------------------------"
Variables ¶
var GIT_PKG_REPO string = "_git_pkg_repo"
The _git_pkg_repo file structure.
<?xml version="1.0" encoding="UTF-8"?> <git>
<url>git@github.com:somebody/my_great_package.git</url> <branch>release-1.2</branch>
</git>
Functions ¶
func CallWithTTY ¶
Add to the sequence the whole changelog entry and reset WIP status
Types ¶
type ChangeLogEntry ¶
Operations with the changelog
type GSCChangeLog ¶
type GSCChangeLog struct { wzlib_logger.WzLogger // contains filtered or unexported fields }
func NewGSCChangeLog ¶
func NewGSCChangeLog() *GSCChangeLog
func (*GSCChangeLog) AddEntry ¶
func (cl *GSCChangeLog) AddEntry(entry *ChangeLogEntry)
func (*GSCChangeLog) GetAll ¶
func (cl *GSCChangeLog) GetAll() []*ChangeLogEntry
GetAll changelog entries
func (*GSCChangeLog) GetFilename ¶
func (cl *GSCChangeLog) GetFilename() string
GetFilename of the changelog
func (*GSCChangeLog) GetLatest ¶
func (cl *GSCChangeLog) GetLatest() *ChangeLogEntry
GetLatest changelog entry
func (*GSCChangeLog) GetWIP ¶
func (cl *GSCChangeLog) GetWIP() (*ChangeLogEntry, error)
GetWIP (work in progress) changelog entry. If none found, creates one and returns. WIP log entry has a marker "# WIP ENTRY" inside the messages.
func (*GSCChangeLog) Render ¶
func (cl *GSCChangeLog) Render() string
Dump changelog back to the file
func (*GSCChangeLog) UpdateWIP ¶
func (cl *GSCChangeLog) UpdateWIP(entry *ChangeLogEntry)
type GSCProjectInfo ¶
type GSCProjectStatus ¶
Definition of OSC status
func NewGSCProjectStatus ¶
func NewGSCProjectStatus() *GSCProjectStatus
type GSCRevisionLog ¶
type GSCRevisionLog struct {
// contains filtered or unexported fields
}
func (*GSCRevisionLog) GetLatest ¶
func (revlog *GSCRevisionLog) GetLatest() *LogEntry
GetLatest revision log entry
type GSCUtils ¶
type GSCUtils struct { wzlib_logger.WzLogger // contains filtered or unexported fields }
func NewGSCUtils ¶
func NewGSCUtils() *GSCUtils
func (*GSCUtils) GetPackageName ¶
GetPackageName from the spec
func (*GSCUtils) GetPackageVersion ¶
GetPackageVersion from the spec
func (*GSCUtils) GetProjectInfo ¶
func (utl *GSCUtils) GetProjectInfo() (*GSCProjectInfo, error)
GetProjectName returns current project name
func (*GSCUtils) GetStatus ¶
func (utl *GSCUtils) GetStatus() (*GSCProjectStatus, error)
GetStatus about the OSC current project (list deleted, modified and added files)
type GitCaller ¶
type GitCaller struct {
wzlib_logger.WzLogger
}
func NewGitCaller ¶
func NewGitCaller() *GitCaller
func (*GitCaller) GetCurrentBranch ¶
func (*GitCaller) GetDefaultBranch ¶
GetDefaultBranch from Git. Note, "default branch" is GitHub's terminology.
func (*GitCaller) GetProjectStatus ¶
func (gitcall *GitCaller) GetProjectStatus() (*GSCProjectStatus, error)
GetProjectStatus is similar to what OSC does, but this returns status for the Git repo
type GitPkgRepo ¶
type GitPkgRepo struct { XMLName xml.Name `xml:"git"` Url string `xml:"url"` Branch string `xml:"branch"` // contains filtered or unexported fields }
func GetRepoFromFile ¶
func GetRepoFromFile(repoUrl string) (*GitPkgRepo, error)
func (*GitPkgRepo) IsNew ¶
func (gpr *GitPkgRepo) IsNew() bool
IsNew returns true if repo file was just created
func (*GitPkgRepo) SetIsNew ¶
func (gpr *GitPkgRepo) SetIsNew()
SetIsNew to true if the repo XML file was just created