diff options
author | John McDonnell <jmcdonnell@gitlab.com> | 2023-08-01 13:15:06 +0300 |
---|---|---|
committer | John McDonnell <jmcdonnell@gitlab.com> | 2023-08-01 20:43:32 +0300 |
commit | 21c679c399afc6fb96ccb3e1d643587afbaac9b2 (patch) | |
tree | 11161257a29d89fb46ff4916bcd85d1ad4ec13b0 | |
parent | 3a47d732729839600a17bf86fcf71c6dcee660fe (diff) |
Add build tags to exlcude praefect testserverjmd/exclude-praefect-test-server-from-build
RunPraefectServer is intended to be used only for testing purposes
so we should exclude it from builds to avoid any logic in the file
from leaking into the actual build.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | internal/praefect/testserver.go | 2 |
2 files changed, 3 insertions, 1 deletions
@@ -66,7 +66,7 @@ GOLANGCI_LINT_CONFIG ?= ${SOURCE_DIR}/.golangci.yml GITALY_PACKAGE := $(shell go list -m 2>/dev/null || echo unknown) GITALY_VERSION := $(shell ${GIT} describe --match v* 2>/dev/null | sed 's/^v//' || cat ${SOURCE_DIR}/VERSION 2>/dev/null || echo unknown) GO_LDFLAGS := -X ${GITALY_PACKAGE}/internal/version.version=${GITALY_VERSION} -SERVER_BUILD_TAGS := tracer_static,tracer_static_jaeger,tracer_static_stackdriver,continuous_profiler_stackdriver +SERVER_BUILD_TAGS := server,tracer_static,tracer_static_jaeger,tracer_static_stackdriver,continuous_profiler_stackdriver GIT2GO_BUILD_TAGS := static,system_libgit2 # Temporary GNU build ID used as a placeholder value so that we can replace it diff --git a/internal/praefect/testserver.go b/internal/praefect/testserver.go index a32c64192..58774f2c9 100644 --- a/internal/praefect/testserver.go +++ b/internal/praefect/testserver.go @@ -1,3 +1,5 @@ +//go:build !server + package praefect import ( |