diff options
author | Hyokeun Jeon <hyokeun.jeon@samsung.com> | 2019-10-01 19:35:06 +0900 |
---|---|---|
committer | Hyokeun Jeon <hyokeun.jeon@samsung.com> | 2019-10-02 13:46:34 +0900 |
commit | 6735d58ea2747d79f4045cb04faf786daca501ec (patch) | |
tree | e1413f61808237c6d02c31299ae83b155a73d011 /build-wgt.template | |
parent | 46dcd609542cdd751b2dfb6c9d60647e072c5adb (diff) | |
download | abs-6735d58ea2747d79f4045cb04faf786daca501ec.tar.gz abs-6735d58ea2747d79f4045cb04faf786daca501ec.tar.bz2 abs-6735d58ea2747d79f4045cb04faf786daca501ec.zip |
Separate Web App templates
Change-Id: If4792db935ab461fcf5d58490f1e5a21de490b43
Diffstat (limited to 'build-wgt.template')
-rw-r--r-- | build-wgt.template | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/build-wgt.template b/build-wgt.template new file mode 100644 index 0000000..5e50135 --- /dev/null +++ b/build-wgt.template @@ -0,0 +1,101 @@ +#!/bin/bash +set -x + +ABS_CMD=/home/build/abs +SHARE_ROOT=__SHARE_ROOT__ +BUILD_ROOT=__BUILD_ROOT__ +SDK_PATH=__SDK_PATH__ +PROFILE=__PROFILE__ +PACKAGE=__PACKAGE__ +BUILD_MODE=__BUILD_MODE__ +PARALLEL_JOBS=__PARALLEL_JOBS__ +TMP_DIR=${BUILD_ROOT}/${PACKAGE}/_abs_out_ +SDK_CMD=$SDK_PATH/tools/ide/bin/tizen +LIST="$SDK_CMD list rootstrap " +BUILD_TYPE=__BUILD_TYPE__ + +chown -R build:build $SHARE_ROOT +su - build -c "cp $SHARE_ROOT/abs/abs $BUILD_ROOT/" +su - build -c "unzip $SHARE_ROOT/${PACKAGE}.zip -d $BUILD_ROOT/ > /dev/null" + +function _clear { + mv ${TMP_DIR}/*.log ${SHARE_ROOT} + exit $1 +} + +UPDATER="$SDK_PATH/update-manager/update-manager-cli.bin" +if [ ! -f $UPDATER ]; then + UPDATER="$SDK_PATH/package-manager/package-manager-cli.bin" +fi + +export DISPLAY=:0 +show_info=`su - build -c "$UPDATER show-info"` +echo "$show_info" +tizen_studio_version=`su - build -c "tizen version"` +echo "$tizen_studio_version" +su - build -c "df -hT" + +echo $tizen_studio_version >> $SHARE_ROOT/tizen_studio_version +tizen_studio_distribution="" +IFS=$'\n' read -d '' -r -a arr <<< "$show_info" +for i in "${arr[@]}"; do + if [[ $i == $"Distribution"*" : "* ]] && [[ ! $i == *ID* ]]; then + ret=`echo "${i##*: }"`; + if [ ! -z $ret ]; then + tizen_studio_distribution=$ret + fi + fi +done +echo $tizen_studio_distribution >> $SHARE_ROOT/tizen_studio_distribution + +rs_list=`su - build -c "tizen list rootstrap | grep .*.core.private.* | cut -d ' ' -f 1"` +#FIXME: remove hard-coded expression +if [ "${PROFILE}" = "da-hfp" ]; then + rs_list=`su - build -c "tizen list rootstrap | grep ${PROFILE}-.*device.core.private.* | cut -d ' ' -f 1"` +fi +echo $rs_list > $SHARE_ROOT/rsver +if [[ ! $rs_list =~ [0-9]{8}_[0-9] ]]; then + conf=`cat ${SDK_PATH}/tools/smart-build-interface/plugins/${rs_list}.xml` + dateversion=`echo $conf | sed "s/.*(\([0-9]\{8\}_[0-9]\{1\}\).*/\1/"` + echo ${rs_list}.${dateversion} > $SHARE_ROOT/rsver +fi + +# Inject tidlc path +TIDLC_PATH=`sed -n '/tidl/p' /home/build/.bashrc | cut -f2 -d':'` +if [ ! -z ${TIDLC_PATH} ]; then echo "PATH=\$PATH:${TIDLC_PATH}" >> /home/build/.profile; fi +su - build -c "tidlc --version" + +for rs in $rs_list; do + echo "BUILDING START TIME: `date`" + #if [[ $rs == *"64.core"* ]]; then + # echo "SKIP! 64-bit not supported!"; continue; + #else + su - build -c "${ABS_CMD} build -r $rs -w ${BUILD_ROOT}/${PACKAGE} -s ABS -t wgt" + #fi + count=`ls -1 ${TMP_DIR}/*.tpk 2>/dev/null | wc -l` + if [ $count != 0 ]; then + mv ${TMP_DIR}/*.tpk ${SHARE_ROOT} + else + mv ${TMP_DIR}/*.wgt ${SHARE_ROOT} + fi + ret=$?; echo "BUILDING FINISH TIME: `date`" + if [ $ret != 0 ]; then + echo $rs build fail; _clear 8 + fi + break +done + +#FIXME: Check 64 bit rootstraps for mobile profile. +#if [[ $BUILD_TYPE = "SUBMIT" ]] && [[ $PROFILE = "mobile" ]]; then +# if [[ $rs_list = *"device64"* ]] && [[ $rs_list = *"emulator64"* ]]; then +# echo "OK. $PROFILE have 64 bit rootstraps" +# else +# echo "NOK. $PROFILE does not have 64 bit rootstraps" +# echo "$PROFILE does not have 64 bit rootstraps" > ${SHARE_ROOT}/build_rootstrap_check.log +# _clear 9 +# fi +#fi + +_clear 0 +su - build -c "df -hT" + |