Skip to content

Commit

Permalink
Making default etcdctl version compatible with the proposed renovate …
Browse files Browse the repository at this point in the history
…config
  • Loading branch information
mimiteto committed Mar 25, 2024
1 parent 194be31 commit f36b79f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions hacks/install_etcdctl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ function show_help () {
}

function install () {
local version="${1:-v3.4.30}" # default version "v3.4.3
# renovate: datasource=github-releases depName=etcd-io/etcd
_version="v3.5.12"
local version="${1:-${_version}}"
local download_url
local arch
local platform
Expand All @@ -35,12 +37,13 @@ function install () {
mkdir -p "${tmp_dir}/dest"

dest="/opt/bin/etcdctl"
# dest="/nonroot/hacks/etcdctl"
if uname="$(whoami)"; then
if [[ "${uname}" == "root" ]]; then
dest="/usr/local/bin/etcdctl"
fi
fi

arch="$(arch)"
case "${arch}" in
x86_64)
Expand All @@ -54,7 +57,7 @@ function install () {
platform="$(uname -s | tr '[:upper:]' '[:lower:]')"
pkg="etcd-${version}-${platform}-${arch}"

download_url="https://github.com/coreos/etcd/releases/download/${version}/${pkg}.tar.gz"
download_url="https://github.com/etcd-io/etcd/releases/download/${version}/${pkg}.tar.gz"

curl -sL "${download_url}" \
-o "${tmp_dir}/${pkg}.tar.gz" && \
Expand Down

0 comments on commit f36b79f

Please sign in to comment.