Skip to content

Commit e32332a

Browse files
authored
fix script v2 (#731)
1 parent baf71c5 commit e32332a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

release/downloadDubboCandidate.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ case "${LOCAL_ARCH}" in
6161
;;
6262
esac
6363

64-
NAME="dubbo-$DUBBO_VERSION"
65-
URL=" https://github.com/apache/dubbo-kubernetes/releases/download/${DUBBO_VERSION}/dubbo-${DUBBO_VERSION}-${OSEXT}.tar.gz"
66-
ARCH_URL=" https://github.com/apache/dubbo-kubernetes/releases/download/${DUBBO_VERSION}/dubbo-${DUBBO_VERSION}-${OSEXT}-${DUBBO_ARCH}.tar.gz"
64+
NAME="dubbo-cp-$DUBBO_VERSION"
65+
URL="https://github.com/apache/dubbo-kubernetes/releases/download/${DUBBO_VERSION}/dubbo-cp-${DUBBO_VERSION}-${OSEXT}.tar.gz"
66+
ARCH_URL="https://github.com/apache/dubbo-kubernetes/releases/download/${DUBBO_VERSION}/dubbo-cp-${DUBBO_VERSION}-${OSEXT}-${DUBBO_ARCH}.tar.gz"
6767

6868

6969
with_arch() {
@@ -72,7 +72,7 @@ with_arch() {
7272
printf "\n%s is not found, please specify a valid DUBBO_VERSION and TARGET_ARCH\n" "$ARCH_URL"
7373
exit 1
7474
fi
75-
filename="dubbo-${DUBBO_VERSION}-${OSEXT}-${DUBBO_ARCH}.tar.gz"
75+
filename="dubbo-cp-${DUBBO_VERSION}-${OSEXT}-${DUBBO_ARCH}.tar.gz"
7676
tar -xzf "${filename}"
7777
rm "${filename}"
7878
}
@@ -84,7 +84,7 @@ without_arch() {
8484
exit 1
8585
fi
8686
curl -fsLO "$URL"
87-
filename="dubbo-${DUBBO_VERSION}-${OSEXT}.tar.gz"
87+
filename="dubbo-cp-${DUBBO_VERSION}-${OSEXT}.tar.gz"
8888
tar -xzf "${filename}"
8989
rm "${filename}"
9090
}

release/downloadDubboctl.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ fi
2727

2828
# Determine the latest Dubboctl version by version number ignoring alpha, beta, and rc versions.
2929
if [ "${DUBBO_VERSION}" = "" ] ; then
30-
DUBBO_VERSION="$(curl -sL https://github.com/apache/dubbo-kubernetes/releases | \
31-
grep -E -o 'dubboctl/([v,V]?)[0-9]*.[0-9]*.[0-9]*' | sort -V | \
32-
tail -1 | awk -F'/' '{ print $2}')"
33-
DUBBO_VERSION="${DUBBOCTL_VERSION##*/}"
30+
DUBBO_VERSION="$(curl -s https://api.github.com/repos/apache/dubbo-kubernetes/releases | \
31+
grep '"tag_name":' | \
32+
grep -vE '(alpha|beta|rc)' | \
33+
head -1 | \
34+
sed -E 's/.*"([^"]+)".*/\1/')"
35+
DUBBO_VERSION="${DUBBO_VERSION##*/}"
3436
fi
3537

3638
if [ "${DUBBOCTL_VERSION}" = "" ] ; then
37-
printf "Unable to get latest Dubboctl version. Set DUBBOCTL_VERSION env var and re-run. For example: export DUBBOCTL_VERSION=0.0.1\n"
39+
printf "Unable to get latest Dubboctl version. Set DUBBOCTL_VERSION env var and re-run. For example: export DUBBOCTL_VERSION=0.1.0\n"
3840
exit 1;
3941
fi
4042

0 commit comments

Comments
 (0)