mirror of
https://github.com/kubernetes/node-problem-detector.git
synced 2026-08-19 12:16:26 +00:00
Use GOHOSTOS to switch journald plugin build
This plugin requires libsystemd to compile, which is only available on Linux. This uses `go env` to determine if the current build platform can support this or not, and if not, disables the building of the plugin to allow compilation on Windows and macOS platforms. Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
This commit is contained in:
@@ -53,7 +53,9 @@ IMAGE:=$(REGISTRY)/node-problem-detector:$(TAG)
|
||||
# support needs libsystemd-dev or libsystemd-journal-dev.
|
||||
ENABLE_JOURNALD?=1
|
||||
|
||||
ifeq ($(shell uname -s 2>/dev/null), Darwin)
|
||||
ifeq ($(go env GOHOSTOS), darwin)
|
||||
ENABLE_JOURNALD=0
|
||||
else ifeq ($(go env GOHOSTOS), windows)
|
||||
ENABLE_JOURNALD=0
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user