1 Star 0 Fork 0

Johnwu/nsq

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
dist.sh 1.45 KB
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
# 1. commit to bump the version and update the changelog/readme
# 2. tag that commit
# 3. use dist.sh to produce tar.gz for all platforms
# 4. upload *.tar.gz to bitly s3 bucket
# 5. docker push nsqio/nsq
# 6. push to nsqio/master
# 7. update the release metadata on github / upload the binaries there too
# 8. update nsqio/nsqio.github.io/_posts/2014-03-01-installing.md
# 9. send release announcement emails
# 10. update IRC channel topic
# 11. tweet
set -e
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
rm -rf $DIR/dist/docker
mkdir -p $DIR/dist/docker
GOFLAGS='-ldflags="-s -w"'
arch=$(go env GOARCH)
version=$(awk '/const Binary/ {print $NF}' < $DIR/internal/version/binary.go | sed 's/"//g')
goversion=$(go version | awk '{print $3}')
echo "... running tests"
./test.sh
export GO111MODULE=on
for os in linux darwin freebsd windows; do
echo "... building v$version for $os/$arch"
BUILD=$(mktemp -d ${TMPDIR:-/tmp}/nsq-XXXXX)
TARGET="nsq-$version.$os-$arch.$goversion"
GOOS=$os GOARCH=$arch CGO_ENABLED=0 \
make DESTDIR=$BUILD PREFIX=/$TARGET BLDFLAGS="$GOFLAGS" install
pushd $BUILD
sudo chown -R 0:0 $TARGET
tar czvf $TARGET.tar.gz $TARGET
mv $TARGET.tar.gz $DIR/dist
popd
make clean
sudo rm -r $BUILD
done
docker build -t nsqio/nsq:v$version .
if [[ ! $version == *"-"* ]]; then
echo "Tagging nsqio/nsq:v$version as the latest release."
docker tag nsqio/nsq:v$version nsqio/nsq:latest
fi
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/johnwu/nsq.git
git@gitee.com:johnwu/nsq.git
johnwu
nsq
nsq
master

搜索帮助