Files
fonteditor/build.sh
menglingjun c8d5190d5d fix build
2014-12-25 17:58:42 +08:00

28 lines
471 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# 时间戳
version=`date "+%Y%m%d"`
# build静态资源
build_asset() {
edp build --stage=release --force
echo "asset path./release"
}
# build模板文件
build_tpl() {
mv ./release/src ./release/$version
cat ./release/index.html |
sed -e "s#'\.\/src'#'./$version'#g" |
tr -s "\n" " " |
sed 's#[[:space:]]\+# #g' > ./release/index.tmp
mv ./release/index.tmp ./release/index.html
}
build_asset
build_tpl