mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
as-package.sh unzip error. #84
This commit is contained in:
+7
-8
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user