Squashed commit of the following:

commit 1897d8af05b3627ac4374f1d2fb285fb7af5199e
Author: Gang Li <gangligit@gmail.com>
Date:   Mon Feb 3 16:35:20 2025 -0800

    use uname -s to get os name

    Signed-off-by: Gang Li <gangligit@gmail.com>

commit 889dd974d5873b8c5e7ccd55732279146db1bcc3
Author: Gang Li <gangligit@gmail.com>
Date:   Mon Feb 3 11:34:13 2025 -0800

    download correct binary for mac os

    Signed-off-by: Gang Li <gangligit@gmail.com>

Signed-off-by: Gang Li <gangligit@gmail.com>
This commit is contained in:
Gang Li 2025-02-03 16:51:09 -08:00
parent 3cc3dafded
commit cf258b83aa

View File

@ -576,7 +576,13 @@ function release_pass {
log_warning "fallback to" ${UPGRADE_VER}
fi
local file="etcd-$UPGRADE_VER-linux-$GOARCH.tar.gz"
local file
if [[ "$(uname -s)" == 'Darwin' ]]; then
file="etcd-$UPGRADE_VER-darwin-$GOARCH.zip"
else
file="etcd-$UPGRADE_VER-linux-$GOARCH.tar.gz"
fi
log_callout "Downloading $file"
set +e