mirror of
https://gitee.com/goploy/goploy.git
synced 2024-11-29 18:57:59 +08:00
U refactor
This commit is contained in:
parent
05c15c06ab
commit
a8d0df30c3
@ -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 = []
|
||||
|
8
build.sh
8
build.sh
@ -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
|
||||
|
||||
|
||||
|
@ -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"
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user