You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
916 B

4 years ago
#!/usr/bin/env bash
echo "选择编译环境输入R将编译正式版"
# shellcheck disable=SC2162
read name
echo "编译中"
go-bindata -o=./asset/asset.go -pkg=asset credentials/...
# shellcheck disable=SC2006
DIR=`dirname "$0"`
# shellcheck disable=SC2164
# shellcheck disable=SC2086
cd $DIR
if [[ -f "./bin/recook" ]];then
echo "删除原来执行文件..."
rm ./bin/recook
fi
if [[ $name == "R" ]]; then
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X recook/configs.environment=release" -tags=jsoniter -v -o ./bin/recook ./main.go
echo "🎄🎄🎄🎄🎄🎄🎄🎄【正式版】编译完成🎄🎄🎄🎄🎄🎄🎄🎄🎄"
else
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags "-X recook/configs.environment=debug" -tags=jsoniter -v -o ./bin/recook ./main.go
echo "🚀🚀🚀🚀【测试版】编译完成🚀🚀🚀🚀🚀"
fi