mirror of
https://github.com/Ed1s0nZ/CyberStrikeAI.git
synced 2026-10-18 21:47:17 +02:00
fix: build the server through the package, not one file
The CLI now lives in two files (main.go and update_cli.go), so `go build cmd/server/main.go` compiles only main.go and leaves updateCommandIfNeeded undefined - which is exactly how run.sh (twice) and both READMEs built. `go build ./cmd/server` compiles the whole package; run.sh's rebuild check already scans internal/ and cmd/ for newer sources, so nothing else needed adjusting.
This commit is contained in:
1 parent
c0f2e25ed1
commit
dc5c4d6a75
3 files changed
+5
-5
No files matched your search
@@ -256,10 +256,10 @@ The `run.sh` script will automatically:
|
||||
**Alternative Launch Methods:**
|
||||
```bash
|
||||
# Direct Go run (set up env yourself); add --https to match run.sh defaults
|
||||
go run cmd/server/main.go --https
|
||||
go run ./cmd/server --https
|
||||
|
||||
# Manual build
|
||||
go build -o cyberstrike-ai cmd/server/main.go
|
||||
go build -o cyberstrike-ai ./cmd/server
|
||||
./cyberstrike-ai --https
|
||||
```
|
||||
|
||||
|
||||
+2
-2
@@ -255,10 +255,10 @@ chmod +x run.sh && ./run.sh
|
||||
**其他启动方式:**
|
||||
```bash
|
||||
# 直接运行(需自行配环境);与 run.sh 默认一致可加 --https
|
||||
go run cmd/server/main.go --https
|
||||
go run ./cmd/server --https
|
||||
|
||||
# 手动编译
|
||||
go build -o cyberstrike-ai cmd/server/main.go
|
||||
go build -o cyberstrike-ai ./cmd/server
|
||||
./cyberstrike-ai --https
|
||||
```
|
||||
|
||||
|
||||
@@ -313,7 +313,7 @@ build_go_project() {
|
||||
(
|
||||
set +e # disable errexit in subshell
|
||||
export GOPROXY="$GOPROXY"
|
||||
go build -o "$BINARY_NAME" cmd/server/main.go >"$GO_BUILD_LOG" 2>&1
|
||||
go build -o "$BINARY_NAME" ./cmd/server >"$GO_BUILD_LOG" 2>&1
|
||||
echo $? > "${GO_BUILD_LOG}.exit"
|
||||
) &
|
||||
GO_BUILD_PID=$!
|
||||
|
||||
Reference in new issue
Block a user