1 Star 0 Fork 127

JietaoXiao/sysom

forked from anolis/sysom 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
package.sh 873 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")
SERVERDIR=sysom_server
WEBDIR=sysom_web
CONFDIR=conf
SCRIPTDIR=script
TOOLSDIR=tools
# build web
pushd sysom_web || exit
yarn
yarn build
popd || exit
mkdir -p "${RELEASE}"
cp -r ${SERVERDIR}/ ${TOOLSDIR}/ ${CONFDIR}/ "${RELEASE}"/
cp -r ${WEBDIR}/dist/ "${RELEASE}"/${WEBDIR}/
mkdir -p "${RELEASE}"/${WEBDIR}/download/
cp ${TOOLSDIR}/deploy/deploy.sh "${RELEASE}"/
cp ${TOOLSDIR}/deploy/clear.sh "${RELEASE}"/
cp -r ${SCRIPTDIR} "${RELEASE}"/
tar czf "${RELEASE}".tar.gz "${RELEASE}"/
rm -rf "${RELEASE}"
green "The release pacakge is ${RELEASE}.tar.gz"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shawtao1125/sysom.git
[email protected]:shawtao1125/sysom.git
shawtao1125
sysom
sysom
master

搜索帮助