()
| 987 | } |
| 988 | |
| 989 | func semanticVersion() (major, minor, patch int) { |
| 990 | r := regexp.MustCompile(`v(\d+)\.(\d+).(\d+)`) |
| 991 | matches := r.FindStringSubmatch(getVersion()) |
| 992 | if len(matches) != 4 { |
| 993 | return 0, 0, 0 |
| 994 | } |
| 995 | |
| 996 | var ints [3]int |
| 997 | for i, s := range matches[1:] { |
| 998 | ints[i], _ = strconv.Atoi(s) |
| 999 | } |
| 1000 | return ints[0], ints[1], ints[2] |
| 1001 | } |
| 1002 | |
| 1003 | func getBranchSuffix() string { |
| 1004 | bs, err := runError("git", "branch", "-a", "--contains") |
no test coverage detected