Skip to content

Commit e224264

Browse files
ndeloofglours
authored andcommitted
Introduced fsnotify build tag to select watcher implementation
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 6599f8a commit e224264

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ ifeq ($(DETECTED_OS),Windows)
2929
BINARY_EXT=.exe
3030
endif
3131

32+
ifeq ($(DETECTED_OS),Darwin)
33+
GO_BUILDTAGS += fsnotify
34+
endif
35+
3236
BUILD_FLAGS?=
3337
TEST_FLAGS?=
3438
E2E_TEST?=
@@ -62,11 +66,11 @@ build:
6266

6367
.PHONY: binary
6468
binary:
65-
$(BUILDX_CMD) bake binary
69+
BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary
6670

6771
.PHONY: binary-with-coverage
6872
binary-with-coverage:
69-
$(BUILDX_CMD) bake binary-with-coverage
73+
BUILD_TAGS="$(GO_BUILDTAGS)" $(BUILDX_CMD) bake binary-with-coverage
7074

7175
.PHONY: install
7276
install: binary

pkg/watch/watcher_darwin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build darwin
1+
//go:build fsnotify
22

33
/*
44
Copyright 2020 Docker Compose CLI authors

pkg/watch/watcher_naive.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//go:build !darwin
1+
//go:build !fsnotify
22

33
/*
44
Copyright 2020 Docker Compose CLI authors

0 commit comments

Comments
 (0)