increment versions
This commit is contained in:
parent
412c84fcd9
commit
65a94faa57
37
merge.go
37
merge.go
|
@ -182,6 +182,43 @@ func (rs *RepoStatus) SetVersion(a, b, c string, reason string) {
|
||||||
// rs.versionMessage.SetValue(reason)
|
// rs.versionMessage.SetValue(reason)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (rs *RepoStatus) IncrementMinorVersion(reason string) {
|
||||||
|
lasttag := rs.lasttag.String()
|
||||||
|
var major, minor, revision string
|
||||||
|
major, minor, revision = splitVersion(lasttag)
|
||||||
|
|
||||||
|
olda, _ := strconv.Atoi(major)
|
||||||
|
oldb, _ := strconv.Atoi(minor)
|
||||||
|
oldc, _ := strconv.Atoi(revision)
|
||||||
|
|
||||||
|
oldb += 1
|
||||||
|
oldc = 0
|
||||||
|
|
||||||
|
newa := strconv.Itoa(olda)
|
||||||
|
newb := strconv.Itoa(oldb)
|
||||||
|
newc := strconv.Itoa(oldc)
|
||||||
|
|
||||||
|
rs.SetVersion(newa, newb, newc, reason)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (rs *RepoStatus) IncrementRevisionVersion(reason string) {
|
||||||
|
lasttag := rs.lasttag.String()
|
||||||
|
var major, minor, revision string
|
||||||
|
major, minor, revision = splitVersion(lasttag)
|
||||||
|
|
||||||
|
olda, _ := strconv.Atoi(major)
|
||||||
|
oldb, _ := strconv.Atoi(minor)
|
||||||
|
oldc, _ := strconv.Atoi(revision)
|
||||||
|
|
||||||
|
oldc += 1
|
||||||
|
|
||||||
|
newa := strconv.Itoa(olda)
|
||||||
|
newb := strconv.Itoa(oldb)
|
||||||
|
newc := strconv.Itoa(oldc)
|
||||||
|
|
||||||
|
rs.SetVersion(newa, newb, newc, reason)
|
||||||
|
}
|
||||||
|
|
||||||
func (rs *RepoStatus) setTag() bool {
|
func (rs *RepoStatus) setTag() bool {
|
||||||
lasttag := rs.lasttag.String()
|
lasttag := rs.lasttag.String()
|
||||||
var major, minor, revision string
|
var major, minor, revision string
|
||||||
|
|
Loading…
Reference in New Issue