From 20638035efc8fd600d2a7aef7e556f48ee3412bc Mon Sep 17 00:00:00 2001 From: "Bala.FA" Date: Thu, 5 Oct 2017 18:52:35 -0700 Subject: [PATCH] build: fetch SDKs/tools version from github --- build/mc/install.sh | 6 +++++- build/minio-go/install.sh | 6 +++++- build/minio-java/install.sh | 6 +++++- build/minio-js/install.sh | 6 +++++- build/minio-py/install.sh | 12 ++++++------ 5 files changed, 26 insertions(+), 10 deletions(-) diff --git a/build/mc/install.sh b/build/mc/install.sh index be7c9bf9..974e907a 100755 --- a/build/mc/install.sh +++ b/build/mc/install.sh @@ -15,7 +15,11 @@ # limitations under the License. # -MC_VERSION="RELEASE.2017-06-15T03-38-43Z" +MC_VERSION=$(curl -s https://api.github.com/repos/minio/mc/releases/latest | jq -r .tag_name) +if [ -z "$MC_VERSION" ]; then + echo "unable to get mc version from github" + exit 1 +fi test_run_dir="$MINT_RUN_CORE_DIR/mc" $WGET --output-document="${test_run_dir}/mc" "https://dl.minio.io/client/mc/release/linux-amd64/mc.${MC_VERSION}" diff --git a/build/minio-go/install.sh b/build/minio-go/install.sh index 7b98e4a5..58e572c6 100755 --- a/build/minio-go/install.sh +++ b/build/minio-go/install.sh @@ -15,7 +15,11 @@ # limitations under the License. # -MINIO_GO_VERSION="3.0.3" +MINIO_GO_VERSION=$(curl -s https://api.github.com/repos/minio/minio-go/releases/latest | jq -r .tag_name) +if [ -z "$MINIO_GO_VERSION" ]; then + echo "unable to get minio-go version from github" + exit 1 +fi test_run_dir="$MINT_RUN_CORE_DIR/minio-go" go get -u github.com/sirupsen/logrus/... diff --git a/build/minio-java/install.sh b/build/minio-java/install.sh index f8455d65..5e6b7bda 100755 --- a/build/minio-java/install.sh +++ b/build/minio-java/install.sh @@ -15,7 +15,11 @@ # limitations under the License. # -MINIO_JAVA_VERSION="3.0.7" +MINIO_JAVA_VERSION=$(curl -s https://api.github.com/repos/minio/minio-java/releases/latest | jq -r .tag_name) +if [ -z "$MINIO_JAVA_VERSION" ]; then + echo "unable to get minio-java version from github" + exit 1 +fi test_run_dir="$MINT_RUN_CORE_DIR/minio-java" git clone --quiet https://github.com/minio/minio-java.git "$test_run_dir/minio-java.git" diff --git a/build/minio-js/install.sh b/build/minio-js/install.sh index 067e6e1a..6044c3e6 100755 --- a/build/minio-js/install.sh +++ b/build/minio-js/install.sh @@ -15,7 +15,11 @@ # limitations under the License. # -MINIO_JS_VERSION="3.2.1" +MINIO_JS_VERSION=$(curl -s https://api.github.com/repos/minio/minio-js/releases/latest | jq -r .tag_name) +if [ -z "$MINIO_JS_VERSION" ]; then + echo "unable to get minio-js version from github" + exit 1 +fi test_run_dir="$MINT_RUN_CORE_DIR/minio-js" mkdir "${test_run_dir}/test" diff --git a/build/minio-py/install.sh b/build/minio-py/install.sh index dee0b0a3..80fcd351 100755 --- a/build/minio-py/install.sh +++ b/build/minio-py/install.sh @@ -15,13 +15,13 @@ # limitations under the License. # -MINIO_PY_VERSION="2.2.5" +MINIO_PY_VERSION=$(curl -s https://api.github.com/repos/minio/minio-py/releases/latest | jq -r .tag_name) +if [ -z "$MINIO_PY_VERSION" ]; then + echo "unable to get minio-py version from github" + exit 1 +fi test_run_dir="$MINT_RUN_CORE_DIR/minio-py" pip3 install --user faker -pip3 install minio==$MINIO_PY_VERSION +pip3 install minio=="$MINIO_PY_VERSION" $WGET --output-document="$test_run_dir/tests.py" "https://raw.githubusercontent.com/minio/minio-py/${MINIO_PY_VERSION}/tests/functional/tests.py" -if [ "$MINIO_PY_VERSION" == "2.2.4" ]; then - # This is needed until we make a new minio-py release. - sed -i 's/DATA_DIR/MINT_DATA_DIR/g' "$test_run_dir/tests.py" -fi