From 6ba65e111250bc9e65c31670523f89a7e2846016 Mon Sep 17 00:00:00 2001 From: ShannonDing Date: Fri, 16 Aug 2019 17:59:41 +0800 Subject: [PATCH] Modify deploy shell to package license and notice file --- deploy.sh => distribution/deploy.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) rename deploy.sh => distribution/deploy.sh (61%) diff --git a/deploy.sh b/distribution/deploy.sh similarity index 61% rename from deploy.sh rename to distribution/deploy.sh index 173d43d50..7af6e309f 100755 --- a/deploy.sh +++ b/distribution/deploy.sh @@ -16,9 +16,10 @@ # limitations under the License. -VERSION="rocketmq-client-cpp" +VERSION="1.2.3" +PKG_NAME="rocketmq-client-cpp" CWD_DIR=$(cd "$(dirname "$0")"; pwd) -DEPLOY_BUILD_HOME=${CWD_DIR}/${VERSION} +DEPLOY_BUILD_HOME=${CWD_DIR}/${PKG_NAME} # ##==================================================================== #make @@ -26,13 +27,20 @@ DEPLOY_BUILD_HOME=${CWD_DIR}/${VERSION} # # deploy rm -rf ${DEPLOY_BUILD_HOME} mkdir -p ${DEPLOY_BUILD_HOME}/lib -cp -rf ${CWD_DIR}/bin/*.a ${DEPLOY_BUILD_HOME}/lib/ -cp -rf ${CWD_DIR}/bin/*.so ${DEPLOY_BUILD_HOME}/lib/ -cp -rf ${CWD_DIR}/include ${DEPLOY_BUILD_HOME}/ -cp -rf ${CWD_DIR}/example ${DEPLOY_BUILD_HOME}/ -cp -rf ${CWD_DIR}/README.md ${DEPLOY_BUILD_HOME}/ +cp -rf ${CWD_DIR}/../bin/*.a ${DEPLOY_BUILD_HOME}/lib/ +if test "$(uname)" = "Linux"; then +cp -rf ${CWD_DIR}/../bin/*.so ${DEPLOY_BUILD_HOME}/lib/ +fi +if test "$(uname)" = "Darwin"; then +cp -rf ${CWD_DIR}/../bin/*.dylib ${DEPLOY_BUILD_HOME}/lib/ +fi +cp -rf ${CWD_DIR}/../include ${DEPLOY_BUILD_HOME}/ +cp -rf ${CWD_DIR}/../example ${DEPLOY_BUILD_HOME}/ +cp -rf ${CWD_DIR}/../README.md ${DEPLOY_BUILD_HOME}/ +cp -rf ${CWD_DIR}/LICENSE-BIN ${DEPLOY_BUILD_HOME}/LICENSE +cp -rf ${CWD_DIR}/NOTICE-BIN ${DEPLOY_BUILD_HOME}/NOTICE -cd ${CWD_DIR} && tar -cvzf ./${VERSION}.tar.gz ./${VERSION} >/dev/null 2>&1 +cd ${CWD_DIR} && tar -cvzf ./${PKG_NAME}-${VERSION}-bin-release.tar.gz ./${PKG_NAME} >/dev/null 2>&1 rm -rf ${DEPLOY_BUILD_HOME} # # ##==================================================================== #make clean