scripts: Fix release script to always build etcd binary before checking version

release-3.4
Joe Betz 2018-06-06 10:48:00 -07:00
parent ab19dee5ce
commit a8990e2e18
No known key found for this signature in database
GPG Key ID: 4930C680B6E0DDB8
1 changed files with 3 additions and 3 deletions

View File

@ -87,10 +87,10 @@ main() {
fi
echo "Updating version from ${source_version} to ${VERSION} in version/version.go"
sed -i "s/${source_version}/${VERSION}/g" version/version.go
echo "Building etcd with updated version"
./build
fi
echo "Building etcd and checking --version output"
./build
local etcd_version=$(bin/etcd --version | grep "etcd Version" | awk '{ print $3 }')
if [[ "${etcd_version}" != "${VERSION}" ]]; then
echo "Wrong etcd version in version/version.go. Expected ${etcd_version} but got ${VERSION}. Aborting."