2020-10-03 13:26:17 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-10-13 19:30:17 +08:00
|
|
|
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" main.go
|
|
|
|
sed -i -e "s/'[0-9].[0-9].[0-9]'/'$x'/g" model/sql/goploy.sql
|
2021-11-09 14:12:28 +08:00
|
|
|
sed -i -e "s/GOPLOY_VER=v[0-9].[0-9].[0-9]/GOPLOY_VER=v$x/g" docker/Dockerfile
|
2021-10-13 19:30:17 +08:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "Build web? [Y/N]";
|
|
|
|
read x
|
|
|
|
|
|
|
|
if [ "$x" == Y ] || [ "$x" == y ]
|
|
|
|
then
|
|
|
|
cd web
|
|
|
|
npm run build
|
|
|
|
cd ..
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
echo "Building goploy";
|
|
|
|
|
2021-10-28 11:39:21 +08:00
|
|
|
env GOOS=linux go build -o goploy main.go
|
2021-10-13 19:30:17 +08:00
|
|
|
|
2021-10-28 11:39:21 +08:00
|
|
|
env GOOS=darwin go build -o goploy.mac main.go
|
|
|
|
|
|
|
|
env GOOS=windows go build -o goploy.exe main.go
|
2021-10-13 19:30:17 +08:00
|
|
|
|
2020-10-03 13:26:17 +08:00
|
|
|
|