1 Star 0 Fork 0

zhulei632/RedisShake

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.sh 833 Bytes
一键复制 编辑 原始数据 按行查看 历史
#!/bin/bash
set -e
echo "[ BUILD RELEASE ]"
BIN_DIR=$(pwd)/bin/
rm -rf "$BIN_DIR"
mkdir -p "$BIN_DIR"
cp shake.toml "$BIN_DIR"
dist() {
echo "try build GOOS=$1 GOARCH=$2"
export GOOS=$g
export GOARCH=$a
export CGO_ENABLED=0
go build -v -trimpath -o "$BIN_DIR/redis-shake" "./cmd/redis-shake"
unset GOOS
unset GOARCH
echo "build success GOOS=$1 GOARCH=$2"
cd "$BIN_DIR"
tar -czvf ./redis-shake-"$1"-"$2".tar.gz ./redis-shake ./shake.toml
cd ..
}
if [ "$1" == "dist" ]; then
echo "[ DIST ]"
for g in "linux" "darwin" "windows"; do
for a in "amd64" "arm64"; do
dist "$g" "$a"
done
done
fi
# build the current platform
echo "try build for current platform"
go build -v -trimpath -o "$BIN_DIR/redis-shake" "./cmd/redis-shake"
echo "build success"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zhulei632/redis-shake.git
[email protected]:zhulei632/redis-shake.git
zhulei632
redis-shake
RedisShake
v4

搜索帮助