1 Star 0 Fork 0

方博飞/chat

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-release.sh 1.42 KB
一键复制 编辑 原始数据 按行查看 历史
or-else 提交于 2020-03-28 12:24 . docker hub http api is just unusable
#!/bin/bash
# Publish Tinode docker images
function containerName() {
if [ "$1" == "alldbs" ]; then
# For alldbs, container name is simply tinode.
local name="tinode"
else
# Otherwise, tinode-$dbtag.
local name="tinode-${dbtag}"
fi
echo $name
}
for line in $@; do
eval "$line"
done
tag=${tag#?}
if [ -z "$tag" ]; then
echo "Must provide tag as 'tag=v1.2.3' or 'v1.2.3-abc0'"
exit 1
fi
# Convert tag into a version
ver=( ${tag//./ } )
if [[ ${ver[2]} != *"-"* ]]; then
FULLRELEASE=1
fi
dbtags=( mysql mongodb rethinkdb alldbs )
# Read dockerhub login/password from a separate file
source .dockerhub
# Login to docker hub
docker login -u $user -p $pass
# Deploy images for various DB backends
for dbtag in "${dbtags[@]}"
do
name="$(containerName $dbtag)"
# Deploy tagged image
if [ -n "$FULLRELEASE" ]; then
docker push tinode/${name}:latest
docker push tinode/${name}:"${ver[0]}.${ver[1]}"
fi
docker push tinode/${name}:"${ver[0]}.${ver[1]}.${ver[2]}"
done
# Deploy chatbot images
if [ -n "$FULLRELEASE" ]; then
docker push tinode/chatbot:latest
docker push tinode/chatbot:"${ver[0]}.${ver[1]}"
fi
docker push tinode/chatbot:"${ver[0]}.${ver[1]}.${ver[2]}"
# Deploy exporter images
if [ -n "$FULLRELEASE" ]; then
docker push tinode/exporter:latest
docker push tinode/exporter:"${ver[0]}.${ver[1]}"
fi
docker push tinode/exporter:"${ver[0]}.${ver[1]}.${ver[2]}"
docker logout
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/fangbofei/chat.git
git@gitee.com:fangbofei/chat.git
fangbofei
chat
chat
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385