From: jaewon81.lim Date: Thu, 23 Jun 2011 03:39:45 +0000 (+0900) Subject: modufy build script for hudson autobuild X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ff5017ac780f92c466889e80f46af06e5f5ded1;p=sdk%2Fide%2Fprofiler-eplugin.git modufy build script for hudson autobuild --- diff --git a/build.sh b/build.sh index 764670b..2003c9d 100755 --- a/build.sh +++ b/build.sh @@ -25,7 +25,7 @@ fresh_ide_path=$start_path/../fresh-ide if [ "x$1" = "x" ] then echo " -Usage : build_ide.sh PLATFORM_NAME TARGET_ECLIPSE_PATH +Usage : build.sh PLATFORM_NAME TARGET_ECLIPSE_PATH PLATFORM_NAME You can set \"linux\" or \"windows\" TARGET_ECLIPSE_PATH Set target eclipse path. @@ -37,13 +37,18 @@ fi if [ "x$2" = "x" ] then echo " -Usage : build_ide.sh $1 TARGET_ECLIPSE_PATH +Usage : build.sh $1 TARGET_ECLIPSE_PATH TARGET_ECLIPSE_PATH Set target eclipse path. For example, $HOME/git/fresh-ide-pde " exit 1 fi +if [ "x$3" != "x" ] +then + build_path=$3 +fi + platform=$1 based_eclipse_path=$2 parent_path_of_based_eclipse=${based_eclipse_path}/.. @@ -64,6 +69,8 @@ case ${platform} in ;; esac +result_archive_file=${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip + if [ -d $build_path ] then echo "Build result directory : [$build_path]" @@ -72,9 +79,14 @@ else mkdir -p $build_path fi -if [ -d $build_result_path ] +echo "Remove legacy build files..." +if [ -d ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} ] +then + rm -rf ${build_result_path}/${archive_platform_name}.${windowing}.${architecture} +fi +if [ -e ${build_result_path}/${result_archive_file} ] then - rm -rf $build_result_path + rm -rf ${build_result_path}/${result_archive_file} fi if [ -d $build_path/plugins ] @@ -106,9 +118,7 @@ rm -rf $build_path/plugins/*.feature echo "Copy fresh ide plugins..." if [ -d ${fresh_ide_path} ] then - cp -rf ${fresh_ide_path}/*.feature ${build_path}/plugins - cp -rf ${fresh_ide_path}/* ${build_path}/plugins - rm -rf ${build_path}/plugins/*.feature + cp -rf /var/lib/hudson/jobs/slp_sdk_fresh_ide/workspace/build_result/N.fresh_ide_build/${archive_platform_name}.${windowing}.${architecture}/IDE/plugins/* ${build_path}/plugins fi echo "Make build.properties file..." @@ -137,7 +147,7 @@ then fi echo "unzip to $build_result_path" -unzip -a $build_result_path/${build_id}-${archive_platform_name}.${windowing}.${architecture}.zip -d $build_result_path/${archive_platform_name}.${windowing}.${architecture} +unzip -a $build_result_path/${result_archive_file} -d $build_result_path/${archive_platform_name}.${windowing}.${architecture} #echo "Delete temp files..." #rm -rf $build_path/features