From 97b3bdf0440800a01074ee3f84f2185c676e5dbf Mon Sep 17 00:00:00 2001 From: Paulo Gustavo Veiga Date: Mon, 4 Jul 2011 13:57:02 -0300 Subject: [PATCH] Create new dist script and scp copy. --- installer/copy-dist.sh | 20 ++++++++++++++++ installer/{build.sh => package-bin.sh} | 2 +- installer/package-src.sh | 32 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 installer/copy-dist.sh rename installer/{build.sh => package-bin.sh} (96%) create mode 100755 installer/package-src.sh diff --git a/installer/copy-dist.sh b/installer/copy-dist.sh new file mode 100644 index 00000000..02a15204 --- /dev/null +++ b/installer/copy-dist.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +set -e +set -u + +WISE_VERSION=$1 +SERVER_DOWNLOAD_DIR=/var + +WISE_BIN_FILE_NAME=wisemapping-${WISE_VERSION}.zip +WISE_BIN_FILE_PATH=./installer/target/${WISE_BIN_FILE_NAME} + +WISE_SRC_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz +WISE_SRC_FILE_PATH=./installer/target/${WISE_SRC_FILE_NAME} + +scp ${WISE_SRC_FILE_PATH} thecrow@wisemapping.com:${SERVER_DOWNLOAD_DIR}/ +scp ${WISE_BIN_FILE_PATH} thecrow@wisemapping.com:${SERVER_DOWNLOAD_DIR} + +# It's there ? +wget -S http://downloads.wisemapping.org/stable/${WISE_BIN_FILE_NAME} +wget -S http://downloads.wisemapping.org/stable/${WISE_SRC_FILE_NAME} \ No newline at end of file diff --git a/installer/build.sh b/installer/package-bin.sh similarity index 96% rename from installer/build.sh rename to installer/package-bin.sh index 4723d5b2..f46d821a 100755 --- a/installer/build.sh +++ b/installer/package-bin.sh @@ -18,7 +18,7 @@ rm -fr ${JETTY_DIR} rm -fr ${TARGET_DIR}/jetty-distribution-7.3.0.v20110203 # Prepare resources .. -mvn -f $BASE_DIR/../pom.xml install -Dmaven.test.skip=true +mvn -f $BASE_DIR/../pom.xml install if [ ! -f ./target/${JETTY_ZIP} ] then diff --git a/installer/package-src.sh b/installer/package-src.sh new file mode 100755 index 00000000..02a9011d --- /dev/null +++ b/installer/package-src.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +set -e +set -u + +WISE_VERSION=$1 +TMP_DIR=/tmp/wise-src/wisemapping-src +TAR_FILE_NAME=wisemapping-${WISE_VERSION}-src.tar.gz +OUTPUT_DIR=`pwd`"/target" +OUTPUT_FILE=${OUTPUT_DIR}/${TAR_FILE_NAME} + + +# Clean all. +cd .. +rm -rf ${TMP_DIR}/../ +mvn clean + +# Prepare copy +mkdir -p ${TMP_DIR} +rsync -aCv --exclude ".git" --exclude "wisemapping.i*" --exclude "*/*.iml" --exclude "*/wisemapping.log*" --exclude "**/.DS_Store" --exclude "*.textile" --exclude "**/.gitignore" --exclude "installer" --exclude "*/target" . ${TMP_DIR} + +# Zip file +[ ! -e ${OUTPUT_DIR} ] && mkdir ${OUTPUT_DIR} +rm -f ${OUTPUT_FILE} + +cd ${TMP_DIR}/.. +tar -cvzf ${OUTPUT_FILE} . + +echo +echo "#################################################################" +echo "Zip file generated on:"${OUTPUT_FILE} +echo "#################################################################"