代码拉取完成,页面将自动刷新
#!/bin/bash
# test wepy new demo
# Start in tasks/ even if run from root directory
cd "$(dirname "$0")"
function cleanup() {
echo 'Cleaning up.'
}
# Error messages are redirected to stderr
function handle_error() {
echo "$(basename $0): ERROR! An error was encountered executing line $1." 1>&2;
cleanup
echo 'Exiting with error.' 1>&2;
exit 1
}
function handle_exit() {
cleanup
echo 'Exiting without error.' 1>&2;
exit
}
# Exit the script with a helpful error message when any error is encountered
trap 'set +x; handle_error $LINENO $BASH_COMMAND' ERR
# Cleanup before exit on any termination signal
trap 'set +x; handle_exit' SIGQUIT SIGTERM SIGINT SIGKILL SIGHUP
# Echo every command being executed
set -x
# Go to root
cd ..
root_path=$PWD
npm link packages/cli
wepy -v
wepy list
mkdir -p /tmp/templates/
cd /tmp/templates/
buildcases="${root_path}/test/build-cases"
for bc in ${buildcases}/*; do
name=$(basename $bc .sh)
"$root_path"/test/build-cases/"$name".sh
cd "/tmp/templates/${name}"
node "$root_path"/packages/cli/bin/wepy.js build
done
# Test build demos
cd /tmp/templates
# node "$root_path"/packages/cli/bin/wepy.js init wepyjs/wepy-wechat-demo wepy-wechat-demo
git clone https://github.com/wepyjs/wepy-wechat-demo.git --branch 2.0
cd wepy-wechat-demo
npm install
npm run build
cd ..
# Cleanup
cleanup
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。