U refactor

This commit is contained in:
zhenorzz 2022-11-23 16:58:30 +08:00
parent 05c15c06ab
commit a8d0df30c3
3 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@ tmp_dir = "tmp"
[build]
args_bin = ["-asset-dir", "./"]
bin = "tmp\\main.exe"
cmd = "go build -o ./tmp/main.exe ."
cmd = "go build -o ./tmp/main.exe ./cmd/server/"
delay = 1000
exclude_dir = ["tmp", "web", "repository"]
exclude_file = []

View File

@ -5,7 +5,7 @@ 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/const appVersion = \"[0-9].[0-9]\+.[0-9]\+\"/const appVersion = \"$x\"/g" cmd/server/main.go
sed -i -e "s/'[0-9].[0-9]\+.[0-9]\+'/'$x'/g" model/sql/goploy.sql
sed -i -e "s/GOPLOY_VER=v[0-9].[0-9]\+.[0-9]\+/GOPLOY_VER=v$x/g" docker/Dockerfile
fi
@ -23,10 +23,10 @@ fi
echo "Building goploy";
env GOOS=linux go build -o goploy main.go
env GOOS=linux go build -o goploy cmd/server/main.go
env GOOS=darwin go build -o goploy.mac main.go
env GOOS=darwin go build -o goploy.mac cmd/server/main.go
env GOOS=windows go build -o goploy.exe main.go
env GOOS=windows go build -o goploy.exe cmd/server/main.go

View File

@ -4,7 +4,7 @@
"license": "GPL-3.0-or-later",
"scripts": {
"dev": "vite",
"server": "cd ../ && go run main.go --asset-dir=./",
"server": "cd ../ && go run cmd/server/main.go --asset-dir=./",
"air": "cd ../ && air",
"build": "vite build"
},