IsUnstableBuild reports whether this is an unstable build. That is, whether its minor version number is odd.
()
| 214 | // IsUnstableBuild reports whether this is an unstable build. |
| 215 | // That is, whether its minor version number is odd. |
| 216 | func IsUnstableBuild() bool { |
| 217 | return isUnstableBuild.Get(func() bool { |
| 218 | _, rest, ok := strings.Cut(Short(), ".") |
| 219 | if !ok { |
| 220 | return false |
| 221 | } |
| 222 | minorStr, _, ok := strings.Cut(rest, ".") |
| 223 | if !ok { |
| 224 | return false |
| 225 | } |
| 226 | minor, err := strconv.Atoi(minorStr) |
| 227 | if err != nil { |
| 228 | return false |
| 229 | } |
| 230 | return minor%2 == 1 |
| 231 | }) |
| 232 | } |
| 233 | |
| 234 | // osVariant returns the OS variant string for systems where we support |
| 235 | // multiple ways of running tailscale(d), if any. |
searching dependent graphs…