Compare commits
1 Commits
721c863f44
...
aa81b0306c
Author | SHA1 | Date |
---|---|---|
knoflook | aa81b0306c |
|
@ -173,12 +173,12 @@ func (curTag Tag) UpgradeElement(newTag Tag) (Tag, error) {
|
|||
return Tag{}, fmt.Errorf("%s and %s are not compatible with each other", curTag.String(), newTag.String())
|
||||
}
|
||||
diff := curTag
|
||||
diff.Major(Itoa(Atoi(newTag.Major) - Atoi(curTag.Major)))
|
||||
diff.Major(strconv.Itoa(strconv.Atoi(newTag.Major) - strconv.Atoi(curTag.Major)))
|
||||
if !curTag.MissingMinor {
|
||||
diff.Minor(Itoa(Atoi(newTag.Minor) - Atoi(curTag.Minor)))
|
||||
diff.Minor(strconv.Itoa(strconv.Atoi(newTag.Minor) - strconv.Atoi(curTag.Minor)))
|
||||
}
|
||||
if !curTag.MissingPatch {
|
||||
diff.Patch(Itoa(Atoi(newTag.Patch) - Atoi(curTag.Patch)))
|
||||
diff.Patch(strconv.Itoa(strconv.Atoi(newTag.Patch) - strconv.Atoi(curTag.Patch)))
|
||||
}
|
||||
|
||||
return diff, nil
|
||||
|
|
Loading…
Reference in New Issue