代码拉取完成,页面将自动刷新
#!/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"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。