From b3724b5b63f6ed94d2a8014b2d09ae5caaaf557c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=96=E7=95=8C?= Date: Thu, 26 Nov 2026 08:36:00 +0800 Subject: [PATCH] Fix generate_completions build --- Makefile | 2 +- cmd/sing-box/generate_completions.go | 2 +- cmd/sing-box/main.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 39cce6f6..f65f42b3 100644 --- a/Makefile +++ b/Makefile @@ -28,7 +28,7 @@ ci_build: go build $(MAIN_PARAMS) $(MAIN) generate_completions: - go run -v --tags "$(TAGS),generate,generate_completions" $(MAIN) + go run -v -ldflags "$(LDFLAGS_SHARED)" --tags "$(TAGS),generate_completions" $(MAIN) schema: go run -ldflags "$(LDFLAGS_SHARED)" --tags "$(TAGS)" $(MAIN) schema -o docs/schema.json diff --git a/cmd/sing-box/generate_completions.go b/cmd/sing-box/generate_completions.go index 6ab0cade..51ebc315 100644 --- a/cmd/sing-box/generate_completions.go +++ b/cmd/sing-box/generate_completions.go @@ -1,4 +1,4 @@ -//go:build generate && generate_completions +//go:build generate_completions package main diff --git a/cmd/sing-box/main.go b/cmd/sing-box/main.go index fd55c7d3..837d3f5c 100644 --- a/cmd/sing-box/main.go +++ b/cmd/sing-box/main.go @@ -1,4 +1,4 @@ -//go:build !generate +//go:build !generate_completions package main