rm old code
This commit is contained in:
parent
283bd90e91
commit
54cdb3fbec
32
common.go
32
common.go
|
@ -37,28 +37,6 @@ func (rs *RepoStatus) String() string {
|
||||||
return rs.path.String()
|
return rs.path.String()
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns the go path for the repo. "go.wit.com/apps/autotypist"
|
|
||||||
func (rs *RepoStatus) GoName() string {
|
|
||||||
return rs.GoPath()
|
|
||||||
}
|
|
||||||
|
|
||||||
// not sure which name is easier to remember. probably this one
|
|
||||||
func (rs *RepoStatus) GoPath() string {
|
|
||||||
return rs.goPath.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// full path
|
|
||||||
func (rs *RepoStatus) FullPath() string {
|
|
||||||
return rs.realPath.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
func (rs *RepoStatus) IsPrimitive() bool {
|
|
||||||
if rs.primitive.String() == "true" {
|
|
||||||
return true
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns the filesystem path to the repo
|
// returns the filesystem path to the repo
|
||||||
func (rs *RepoStatus) Path() string {
|
func (rs *RepoStatus) Path() string {
|
||||||
if rs == nil {
|
if rs == nil {
|
||||||
|
@ -185,7 +163,6 @@ func (rs *RepoStatus) IncrementVersion() bool {
|
||||||
rs.EnableSelectTag()
|
rs.EnableSelectTag()
|
||||||
rs.setTag()
|
rs.setTag()
|
||||||
newtag := "v" + rs.newversion.String()
|
newtag := "v" + rs.newversion.String()
|
||||||
log.Log(REPOWARN, rs.GoPath(), "old version:", rs.LastTag(), "new version:", newtag)
|
|
||||||
rs.targetReleaseVersion.SetText(newtag)
|
rs.targetReleaseVersion.SetText(newtag)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
@ -212,15 +189,6 @@ func (rs *RepoStatus) SetPrivate(b bool) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// returns a name for human consuption only
|
|
||||||
// todo: implement nicknames
|
|
||||||
func (rs *RepoStatus) Name() string {
|
|
||||||
if rs.IsGoLang() {
|
|
||||||
return rs.GoPath()
|
|
||||||
}
|
|
||||||
return rs.Path()
|
|
||||||
}
|
|
||||||
|
|
||||||
func trimNonNumericFromStart(s string) string {
|
func trimNonNumericFromStart(s string) string {
|
||||||
for i, r := range s {
|
for i, r := range s {
|
||||||
if unicode.IsDigit(r) {
|
if unicode.IsDigit(r) {
|
||||||
|
|
2
merge.go
2
merge.go
|
@ -46,13 +46,11 @@ func (rs *RepoStatus) fetchBranchByName(bname string) (error, string) {
|
||||||
if rs.gitConfig == nil {
|
if rs.gitConfig == nil {
|
||||||
return errors.New("missing .git/config"), ""
|
return errors.New("missing .git/config"), ""
|
||||||
}
|
}
|
||||||
log.Log(REPO, rs.Name(), "looking for branch:", bname)
|
|
||||||
for name, branch := range rs.gitConfig.branches {
|
for name, branch := range rs.gitConfig.branches {
|
||||||
if name == bname {
|
if name == bname {
|
||||||
// found the branch!
|
// found the branch!
|
||||||
log.Log(REPO, " ", name, "remote:", branch.remote, "merge", branch.merge)
|
log.Log(REPO, " ", name, "remote:", branch.remote, "merge", branch.merge)
|
||||||
cmd := []string{"git", "fetch", branch.remote, bname + ":" + bname}
|
cmd := []string{"git", "fetch", branch.remote, bname + ":" + bname}
|
||||||
log.Log(REPO, "running:", rs.Name(), cmd)
|
|
||||||
r := rs.Run(cmd)
|
r := rs.Run(cmd)
|
||||||
output := strings.Join(r.Stdout, "\n")
|
output := strings.Join(r.Stdout, "\n")
|
||||||
return r.Error, strings.TrimSpace(output)
|
return r.Error, strings.TrimSpace(output)
|
||||||
|
|
Loading…
Reference in New Issue