libgo: handle go1.10+ correctly in match.sh

match.sh was not correctly handling build constraints for Go versions
that have a two-digit suffix, like "go1.10".

The same issue will arise with Go 1.100, but that is a long ways off.

Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/260077
This commit is contained in:
Nikhil Benesch 2020-10-07 01:14:49 -04:00 committed by Ian Lance Taylor
parent 1e247c60df
commit 89d3af5ef7
3 changed files with 9 additions and 9 deletions

View File

@ -1,4 +1,4 @@
613e530547549f4220c4571ea913acbe5fa56f72
762b74a56f7ca102a5b8da1c9d0ffce592caa46b
The first line of this file holds the git revision number of the last
merge done from the gofrontend repository.

View File

@ -151,18 +151,18 @@ for f in $gofiles; do
fi
match=false
;;
$goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9])
$goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9] | go1.[0-9][0-9])
match=true
;;
"!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9])
"!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9])
;;
*,*)
cmatch=true
for ctag in `echo $tag | sed -e 's/,/ /g'`; do
case $ctag in
$goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9])
$goos | $goarch | $cgotag | $cmdlinetag | "gccgo" | go1.[0-9] | go1.[0-9][0-9])
;;
"!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9])
"!"$goos | "!"$goarch | "!"$cgotag | "!"$cmdlinetag | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9])
cmatch=false
;;
"!"*)

View File

@ -342,18 +342,18 @@ x)
fi
match=false
;;
$goos | $goarch | cgo | gccgo | go1.[0-9])
$goos | $goarch | cgo | gccgo | go1.[0-9] | go1.[0-9][0-9])
match=true
;;
"!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9])
"!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9])
;;
*,*)
cmatch=true
for ctag in `echo $tag | sed -e 's/,/ /g'`; do
case $ctag in
$goos | $goarch | cgo | gccgo | go1.[0-9])
$goos | $goarch | cgo | gccgo | go1.[0-9] | go1.[0-9][0-9])
;;
"!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9])
"!"$goos | "!"$goarch | "!cgo" | "!gccgo" | "!"go1.[0-9] | "!"go1.[0-9][0-9])
cmatch=false
;;
"!"*)