Client build scripts fixes and server stub with local devzone.
All checks were successful
Linting and tests / Linting (push) Successful in 6s

This commit is contained in:
2025-09-13 18:13:50 +05:00
parent 1bf8a5b124
commit 3cfc74affa
21 changed files with 578 additions and 23 deletions

5
server/cmd/Taskfile.yml Normal file
View File

@@ -0,0 +1,5 @@
---
version: "3"
includes:
bunkerd: ./bunkerd

View File

@@ -0,0 +1,26 @@
---
version: "3"
tasks:
build:
desc: "Builds bunkerd binary."
cmds:
- task: :::ensure-builddir
- task: cleanup
- go build -ldflags="{{ .BASIC_LDFLAGS }}" -o _build/bunkerd{{exeExt}} ./server/cmd/bunkerd/main.go
sources:
- ./Taskfile.yml
- ./go.mod
- ./commons/*
- ./server/**/*.go
- ./server/Taskfile.yml
- ./server/**/Taskfile.yml
- ./server/entrypoint.sh
generates:
- ./_build/bunkerd{{exeExt}}
method: timestamp
cleanup:
desc: "Deletes bunkerd binary from local build cache."
cmds:
- rm -f _build/bunkerd{{exeExt}}

View File

@@ -0,0 +1,39 @@
package main
import (
"os"
"bunker/commons"
"bunker/server/internal/application"
)
func main() {
app := application.New()
lgr := app.NewLogger("module", "main")
lgr.Info(
"Starting bunkerd...",
"version", commons.Version,
"build_no", commons.Build,
"buint_on", commons.BuildDate,
"commit", commons.Commit,
"branch", commons.Branch,
)
if err := app.Start(); err != nil {
lgr.Error("Failed to start bunkerd!", "error", err.Error())
os.Exit(1)
}
lgr.Info("bunkerd started.")
<-app.ShutdownChan()
lgr.Info("Shutting down bunkerd...")
if err := app.Shutdown(); err != nil {
lgr.Error("Failed to shutdown bunkerd!", "error", err.Error())
os.Exit(1)
}
}