Jenkins 前端 自动化发版/CICD
核心代码脚本:#!/bin/bash -ilecho ${branch}echo ${branch}current=${branch}online="release"if [[ $current == *$online* ]]thenecho "打包product线上环境,分支为:"${branch: 7}SASS_BINARY_SITE=https://npm.taobao.org/mirror
·
核心代码脚本:
#!/bin/bash -il
echo ${branch}
echo ${branch}
current=${branch}
online="release"
if [[ $current == *$online* ]]
then
echo "打包product线上环境,分支为:"${branch: 7}
SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass;
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install
cnpm run build
name="hluser_"${branch: 7}".tar.gz"
tar -zcvf $name dist
exit
else
echo "打包test测试环境,分支为:"${branch}
SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ npm install node-sass;
npm install -g cnpm --registry=https://registry.npmmirror.com
cnpm install
cnpm run stage
tar -zcvf hluser.tar.gz dist
fi
更多推荐
已为社区贡献4条内容
所有评论(0)