1 Star 0 Fork 113

Leq / sysom

forked from anolis / sysom 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
package.sh 794 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
check_cmd() {
local cmd="$1"
if ! command -v "${cmd}" >/dev/null 2>&1; then
echo >&2 "I require ${cmd} but it's not installed. Aborting."
exit 1
fi
}
green() {
printf '\33[1;32m%b\n\33[0m' "$1"
}
check_cmd yarn
check_cmd tar
RELEASE=sysomRelease-$(date +"%Y%m%d%H%M%S")
APIDIR=sysom_api
WEBDIR=sysom_web
SCRIPTDIR=script
TOOLSDIR=tools
# build web
pushd sysom_web || exit
yarn
yarn build
popd || exit
mkdir -p "${RELEASE}"
cp -r ${APIDIR}/ ${TOOLSDIR}/ "${RELEASE}"/
cp -r ${WEBDIR}/dist/ "${RELEASE}"/${WEBDIR}/
mkdir -p "${RELEASE}"/${WEBDIR}/download/
cp ${TOOLSDIR}/deploy/deploy.sh "${RELEASE}"/
cp -r ${SCRIPTDIR} "${RELEASE}"/
tar czf "${RELEASE}".tar.gz "${RELEASE}"/
rm -rf "${RELEASE}"
green "The release pacakge is ${RELEASE}.tar.gz"
1
https://gitee.com/leierqiang/sysom.git
git@gitee.com:leierqiang/sysom.git
leierqiang
sysom
sysom
master

搜索帮助