INNER CODE UNIT · Go
incrementVersionPart
cri-o/cri-o · scripts/version_bump.go:94
func incrementVersionPart(part string) string {
// Convert the part to an integer, increment it, and convert back to string
num, err := strconv.Atoi(part)
if err != nil {
return "0"
}
num++
return strconv.Itoa(num)
}
func updateSpecVersion(specFile, oldVersion, newVersion string) error {
content, err := os.ReadFile(specFile)
if err != nil {
return err
}