attempt at merge to master
This commit is contained in:
parent
32a5530129
commit
a07ad8bae8
|
@ -32,6 +32,11 @@ func (r *Repo) MergeToDevel() (*cmd.Status, error) {
|
||||||
// devel branch is not remote. do not try 'git push'
|
// devel branch is not remote. do not try 'git push'
|
||||||
return result, nil
|
return result, nil
|
||||||
}
|
}
|
||||||
|
if r.GetReadOnly() {
|
||||||
|
r.Reload() // rescan the repo
|
||||||
|
// devel branch is read only. you can not git push
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
// it seems like we have write access. lets find out!
|
// it seems like we have write access. lets find out!
|
||||||
cmd = []string{"git", "push"}
|
cmd = []string{"git", "push"}
|
||||||
|
@ -46,9 +51,6 @@ func (r *Repo) MergeToDevel() (*cmd.Status, error) {
|
||||||
|
|
||||||
func (r *Repo) MergeToMaster() (*cmd.Status, error) {
|
func (r *Repo) MergeToMaster() (*cmd.Status, error) {
|
||||||
r.Reload()
|
r.Reload()
|
||||||
ro := r.GetReadOnly()
|
|
||||||
log.Info("ro is", ro, "for", r.GetGoPath())
|
|
||||||
return nil, nil
|
|
||||||
|
|
||||||
if r.GetCurrentBranchName() != r.GetMasterBranchName() {
|
if r.GetCurrentBranchName() != r.GetMasterBranchName() {
|
||||||
return nil, fmt.Errorf("repo not on master branch")
|
return nil, fmt.Errorf("repo not on master branch")
|
||||||
|
@ -68,6 +70,12 @@ func (r *Repo) MergeToMaster() (*cmd.Status, error) {
|
||||||
return result, err
|
return result, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if r.GetReadOnly() {
|
||||||
|
r.Reload() // rescan the repo
|
||||||
|
// master branch is read only. you can not git push
|
||||||
|
return result, nil
|
||||||
|
}
|
||||||
|
|
||||||
// it seems like we have write access. lets find out!
|
// it seems like we have write access. lets find out!
|
||||||
cmd = []string{"git", "push"}
|
cmd = []string{"git", "push"}
|
||||||
result, err = r.RunQuiet(cmd)
|
result, err = r.RunQuiet(cmd)
|
||||||
|
|
Loading…
Reference in New Issue