1 Star 0 Fork 207

yioye/goploy

forked from goploy/goploy 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
build.sh 1.32 KB
一键复制 编辑 原始数据 按行查看 历史
zhenorzz 提交于 2024-06-12 10:39 . Added: notification template
#!/bin/bash
echo "Change version number? [Version number/N]";
read x
if [[ $x =~ ^[1-9].[0-9]+.[0-9]+$ ]]
then
sed -i -e "s/const appVersion = \"[0-9].[0-9]\+.[0-9]\+\"/const appVersion = \"$x\"/g" cmd/server/main.go
sed -i -e "s/@version [0-9].[0-9]\+.[0-9]\+/@version $x/g" cmd/server/main.go
sed -i -e "s/'[0-9].[0-9]\+.[0-9]\+'/'$x'/g" database/goploy.sql
sed -i -e "s/GOPLOY_VER=v[0-9].[0-9]\+.[0-9]\+/GOPLOY_VER=v$x/g" docker/Dockerfile
sed -i -e "s/\"version\": \"[0-9].[0-9]\+.[0-9]\+\"/\"version\": \"$x\"/g" web/package.json
fi
echo "Build web? [Y/N]";
read x
if [ "$x" == Y ] || [ "$x" == y ]
then
cd web
npm run build
cd ..
fi
echo "env GOOS=linux go build -o goploy cmd/server/main.go";
env GOOS=linux go build -o goploy cmd/server/main.go
echo "env GOOS=linux GOARCH=arm64 go build -o goploy_arm64 cmd/server/main.go";
env GOOS=linux GOARCH=arm64 go build -o goploy_arm64 cmd/server/main.go
echo "env GOOS=darwin GOARCH=arm64 go build -o goploy_arm64.mac cmd/server/main.go";
env GOOS=darwin GOARCH=arm64 go build -o goploy_arm64.mac cmd/server/main.go
echo "env GOOS=darwin go build -o goploy.mac cmd/server/main.go";
env GOOS=darwin go build -o goploy.mac cmd/server/main.go
echo "env GOOS=windows go build -o goploy.exe cmd/server/main.go";
env GOOS=windows go build -o goploy.exe cmd/server/main.go
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/yioye/goploy.git
git@gitee.com:yioye/goploy.git
yioye
goploy
goploy
master

搜索帮助