Skip to content

Commit

Permalink
installation: allow *_VERSION passing without v
Browse files Browse the repository at this point in the history
Allow users passing *_VERSION without `v` like `0.4.1`

Signed-off-by: llhuii <[email protected]>
  • Loading branch information
llhuii committed Dec 1, 2021
1 parent 5a08bcb commit 18020ea
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion scripts/installation/all-in-one.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,14 @@ function prepare_env() {
if [ -z "${KUBEEDGE_VERSION:-}" ]; then
KUBEEDGE_VERSION=$(get_latest_version kubeedge/kubeedge $DEFAULT_KUBEEDGE_VERSION)
fi
# 1.8.0 => v1.8.0
# v1.8.0 => v1.8.0
KUBEEDGE_VERSION=v${KUBEEDGE_VERSION#v}

if [ -z "${SEDNA_VERSION:-}" ]; then
SEDNA_VERSION=$(get_latest_version kubeedge/sedna $DEFAULT_SEDNA_VERSION)
fi
SEDNA_VERSION=v${SEDNA_VERSION#v}

: ${NUM_CLOUD_WORKER_NODES:=0}
: ${NUM_EDGE_NODES:=1}
Expand Down Expand Up @@ -419,7 +423,7 @@ function install_sedna() {
log_info "Installing Sedna Control Components..."

run_in_control_plane bash -ec "
curl https://raw.githubusercontent.com/kubeedge/sedna/main/scripts/installation/install.sh | SEDNA_ACTION=create bash -
curl https://raw.githubusercontent.com/kubeedge/sedna/main/scripts/installation/install.sh | SEDNA_ACTION=create SEDNA_VERSION=$SEDNA_VERSION bash -
"
}

Expand Down
1 change: 1 addition & 0 deletions scripts/installation/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ get_latest_version() {
}

: ${SEDNA_VERSION:=$(get_latest_version)}
SEDNA_VERSION=v${SEDNA_VERSION#v}

_download_yamls() {

Expand Down

0 comments on commit 18020ea

Please sign in to comment.