From 58394dc8049a2ca55460b16fde1d287874875600 Mon Sep 17 00:00:00 2001 From: hengyunabc Date: Thu, 18 Oct 2018 16:51:57 +0800 Subject: [PATCH] as-package.sh unzip error. #84 --- as-package.sh | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/as-package.sh b/as-package.sh index 0cb8d4039..79a6a4d86 100755 --- a/as-package.sh +++ b/as-package.sh @@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" get_local_maven_project_version() { - $DIR/mvnw org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate \ + "$DIR/mvnw" org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate \ -Dexpression=project.version -f $DIR/pom.xml | grep -e '^[^\[]' | cut -b 1-5 } @@ -15,7 +15,7 @@ DATE=$(date '+%Y%m%d%H%M%S') ARTHAS_VERSION="${CUR_VERSION}.${DATE}" -echo ${ARTHAS_VERSION} > $DIR/core/src/main/resources/com/taobao/arthas/core/res/version +echo "${ARTHAS_VERSION}" > $DIR/core/src/main/resources/com/taobao/arthas/core/res/version # define newset arthas lib home NEWEST_ARTHAS_LIB_HOME=${HOME}/.arthas/lib/${ARTHAS_VERSION}/arthas @@ -30,17 +30,16 @@ exit_on_err() exit ${1} } - -packaging_bin_path="$(ls ${DIR}/packaging/target/arthas-*-bin.zip)" - # maven package the arthas -$DIR/mvnw clean package -Dmaven.test.skip=true -f $DIR/pom.xml \ +"$DIR/mvnw" clean package -Dmaven.test.skip=true -f $DIR/pom.xml \ || exit_on_err 1 "package arthas failed." -rm -r $DIR/core/src/main/resources/com/taobao/arthas/core/res/version +rm -r "$DIR/core/src/main/resources/com/taobao/arthas/core/res/version" + +packaging_bin_path=$(ls "${DIR}"/packaging/target/arthas-*-bin.zip) # install to local -mkdir -p ${NEWEST_ARTHAS_LIB_HOME} +mkdir -p "${NEWEST_ARTHAS_LIB_HOME}" unzip ${packaging_bin_path} -d "${NEWEST_ARTHAS_LIB_HOME}/" # print ~/.arthas directory size