chore: Simplify build command in .air.toml configuration

- Removed deprecated CGO flags from the build command in the .air.toml file, streamlining the build process for the application.
- This change enhances compatibility and reduces potential build warnings, improving the overall development experience.
This commit is contained in:
wizardchen
2026-04-23 10:36:31 +08:00
parent ffc4eeaf57
commit 3074842e30

View File

@@ -5,7 +5,7 @@ tmp_dir = "tmp"
[build]
args_bin = []
bin = "./tmp/main"
cmd = "CGO_CFLAGS='-Wno-deprecated-declarations -Wno-gnu-folding-constant' $(uname | grep -q Darwin && echo \"CGO_LDFLAGS='-Wl,-no_warn_duplicate_libraries'\") go build -ldflags=\"$(./scripts/get_version.sh ldflags) -X 'google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn'\" -o ./tmp/main ./cmd/server"
cmd = "go build -ldflags=\"$(./scripts/get_version.sh ldflags) -X 'google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn'\" -o ./tmp/main ./cmd/server"
delay = 1000
exclude_dir = ["assets", "tmp", "vendor", "testdata", "frontend", "migrations", "node_modules", "docs", "logs", "data", "WeKnora-Chrome-Extension", "Formula", "dataset", "docreader", "docker", "llm_debug", "web", "mcp-server", "misc", "scripts", "dist", "client", "helm"]
exclude_file = []