mirror of
https://github.com/golang/go
synced 2024-11-18 14:54:40 -07:00
Revert "cmd/api: treat a hex-y VERSION as devel and permit API changes"
This reverts commit 11d1c05
.
See #9296 for details.
Change-Id: I89a36351cb007836662f28a611af5616818b95fe
Reviewed-on: https://go-review.googlesource.com/1536
Reviewed-by: Minux Ma <minux@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
906aefb038
commit
c71b3e0e88
@ -107,22 +107,12 @@ func setContexts() {
|
||||
}
|
||||
}
|
||||
|
||||
var (
|
||||
internalPkg = regexp.MustCompile(`(^|/)internal($|/)`)
|
||||
hashRx = regexp.MustCompile(`^[0-9a-f]{7,40}$`)
|
||||
)
|
||||
|
||||
func isDevelVersion(v string) bool {
|
||||
if strings.Contains(v, "devel") {
|
||||
return true
|
||||
}
|
||||
return hashRx.MatchString(v)
|
||||
}
|
||||
var internalPkg = regexp.MustCompile(`(^|/)internal($|/)`)
|
||||
|
||||
func main() {
|
||||
flag.Parse()
|
||||
|
||||
if v := runtime.Version(); !strings.Contains(v, "weekly") && !isDevelVersion(v) {
|
||||
if !strings.Contains(runtime.Version(), "weekly") && !strings.Contains(runtime.Version(), "devel") {
|
||||
if *nextFile != "" {
|
||||
fmt.Printf("Go version is %q, ignoring -next %s\n", runtime.Version(), *nextFile)
|
||||
*nextFile = ""
|
||||
@ -293,7 +283,7 @@ func compareAPI(w io.Writer, features, required, optional, exception []string) (
|
||||
delete(optionalSet, newFeature)
|
||||
} else {
|
||||
fmt.Fprintf(w, "+%s\n", newFeature)
|
||||
if !*allowNew || !isDevelVersion(runtime.Version()) {
|
||||
if !*allowNew || !strings.Contains(runtime.Version(), "devel") {
|
||||
ok = false // we're in lock-down mode for next release
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user