mirror of
https://github.com/golang/go
synced 2024-10-02 10:18:33 -06:00
build: make version.bash aware of branches
Fixes #2026. R=bradfitz, rsc CC=golang-dev https://golang.org/cl/4645074
This commit is contained in:
parent
73896bdc85
commit
4dfdacd2bd
@ -16,8 +16,15 @@ if [ $? != 0 ]; then
|
|||||||
VERSION=$(echo $OLD | awk '{print $1}')
|
VERSION=$(echo $OLD | awk '{print $1}')
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Find most recent known release tag.
|
# Get branch type
|
||||||
|
BRANCH=release
|
||||||
|
if [ "$(hg identify -b 2>/dev/null)" == "default" ]; then
|
||||||
|
BRANCH=weekly
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Find most recent known release or weekly tag.
|
||||||
TAG=$(hg tags |
|
TAG=$(hg tags |
|
||||||
|
grep $BRANCH |
|
||||||
sed 's/:.*//' |
|
sed 's/:.*//' |
|
||||||
sort -rn -k2 |
|
sort -rn -k2 |
|
||||||
awk -v ver=$VERSION '$2 <= ver && $1~/^(release|weekly)\./ {print $1}' |
|
awk -v ver=$VERSION '$2 <= ver && $1~/^(release|weekly)\./ {print $1}' |
|
||||||
|
Loading…
Reference in New Issue
Block a user