1 Star 0 Fork 1

Aaron / rainbond-ui

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
cdn_release.sh 875 Bytes
一键复制 编辑 原始数据 按行查看 历史
Aaron 提交于 2021-07-09 16:30 . update
#!/bin/bash
osstool="./ossutil64"
os=$(uname -s)
osstool_install() {
if [ ! -f ${osstool} ]; then
echo "installing ossutil binary"
if [ "$os" == "Darwin" ]; then
wget http://gosspublic.alicdn.com/ossutil/1.6.14/ossutilmac64 -O ${osstool}
else
wget http://gosspublic.alicdn.com/ossutil/1.6.3/ossutil64 -O ${osstool}
fi
chmod +x ${osstool}
cat >~/.ossutilconfig <<EOF
[Credentials]
language=CH
endpoint=http://oss-cn-shanghai.aliyuncs.com
accessKeyID=${CDN_ACCESS_KEY_ID}
accessKeySecret=${CDN_ACCESS_KEY_SECRET}
EOF
fi
}
if [ "${ENABLE_CDN}" == 'true' ]; then
echo "Upload static file to oss"
osstool_install
now_day=$(date '+%Y-%m-%d')
${osstool} mkdir "oss://grstatic/cdn-demo/publish/${now_day}/"
${osstool} cp -u -r dist/ "oss://grstatic/cdn-demo/publish/${now_day}/"
fi
1
https://gitee.com/Aaron-23/rainbond-ui.git
git@gitee.com:Aaron-23/rainbond-ui.git
Aaron-23
rainbond-ui
rainbond-ui
master

搜索帮助