Docker-compose install script supports default version as latest
@@ -34,7 +34,12 @@ function check_sed() {
version=${1}
-if [[ $version != v* && $version != 'latest' ]]; then
+if [[ $version == '' || $version == 'latest' ]]; then
+ echo "The version will be set to latest."
+ version='master'
+fi
+
+if [[ $version != v* && $version != 'master' ]]; then
echo "The version should start with 'v', such as 'v2.4.2' or 'latest'."
exit 1
fi
@@ -48,9 +53,9 @@ cd shenyu-${version}
mkdir -p {shenyu-bootstrap,shenyu-admin}/{conf,logs}
echo "Downloading docker-compose configuration ..."
-curl -sSl https://raw.githubusercontent.com/apache/incubator-shenyu/${version}/shenyu-dist/shenyu-docker-compose-dist/src/main/resources/docker-compose.yaml > docker-compose.yaml
+curl -sSl https://raw.githubusercontent.com/apache/incubator-shenyu/master/shenyu-dist/shenyu-docker-compose-dist/src/main/resources/docker-compose.yaml > docker-compose.yaml
-if [ "$version" != "latest" ];then
+if [ "$version" != "master" ];then
check_sed
newVersion=${version#"v"}
if [[ "$OSTYPE" == "darwin"* ]]; then
