source ./common.sh

WORK_DIR=`pwd`
cd ${SOURCE_PATH}
${PRE_COMPILE_CMD}
npm install
${POST_COMPILE_CMD}
cd ${WORK_DIR}

tag_name=`git status |grep '# On branch '|sed 's/# On branch //g'`
dir_name=`basename $PWD`
package_name=${dir_name}.tar.gz

tar --exclude=*.git -chzf target/${package_name} bin common.sh reload.sh restart.sh ecosystem.config.js config ${EXT_PKG_FILES}
