get the proper devel branch name
This commit is contained in:
parent
b12bc0a9ec
commit
b2d3d13ed9
12
revert.go
12
revert.go
|
@ -11,6 +11,7 @@ func (rs *RepoStatus) RevertMasterToDevel() bool {
|
||||||
}
|
}
|
||||||
|
|
||||||
curName := rs.GetCurrentBranchName()
|
curName := rs.GetCurrentBranchName()
|
||||||
|
dName := rs.GetDevelBranchName()
|
||||||
mName := rs.GetMasterBranchName()
|
mName := rs.GetMasterBranchName()
|
||||||
if curName != mName {
|
if curName != mName {
|
||||||
log.Info("repo is not working from main branch", curName, "!=", mName)
|
log.Info("repo is not working from main branch", curName, "!=", mName)
|
||||||
|
@ -19,19 +20,14 @@ func (rs *RepoStatus) RevertMasterToDevel() bool {
|
||||||
|
|
||||||
log.Info("reset master to devel", curName, rs.String())
|
log.Info("reset master to devel", curName, rs.String())
|
||||||
|
|
||||||
// git checkout devel
|
|
||||||
// git branch -D master
|
|
||||||
// git branch master
|
|
||||||
// git checkout master
|
|
||||||
// git push --set-upstream --force origin master
|
|
||||||
|
|
||||||
var all [][]string
|
var all [][]string
|
||||||
all = append(all, []string{"git", "checkout", "devel"})
|
all = append(all, []string{"git", "checkout", dName}) // switch to the devel branch
|
||||||
all = append(all, []string{"git", "branch", "-D", mName})
|
all = append(all, []string{"git", "branch", "-D", mName})
|
||||||
all = append(all, []string{"git", "branch", mName})
|
all = append(all, []string{"git", "branch", mName}) // make a master branch based on devel
|
||||||
all = append(all, []string{"git", "checkout", mName})
|
all = append(all, []string{"git", "checkout", mName})
|
||||||
all = append(all, []string{"git", "push", "--set-upstream", "--force", "origin", mName})
|
all = append(all, []string{"git", "push", "--set-upstream", "--force", "origin", mName})
|
||||||
|
|
||||||
|
// don't do anything with tags here
|
||||||
// all = append(all, []string{"git", "tag", "--delete", release.version.String()})
|
// all = append(all, []string{"git", "tag", "--delete", release.version.String()})
|
||||||
// all = append(all, []string{"git", "push", "--delete", "origin", release.version.String()})
|
// all = append(all, []string{"git", "push", "--delete", "origin", release.version.String()})
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue