Skip to content

Commit 16cf22d

Browse files
committed
build: Ensure binaries are rebuilt on any source change
The Makefile has a `SOURCES` variable which contains a list of all go source files used by crc. It's used as a dependency for the targets building binaries so that the binaries are rebuilt on any source changes. This broke in 1d10459 when a release_info_test.go file was added to the top level directory. Since `SOURCES` is set to `git ls-files *.go ":^vendor"` shell expansion will happen before `git ls-files` runs, so we'll be running `git ls-files release_info_test.go ":^vendor"`, the `SOURCES` variable will only contain `release_info_test.go` instead of the list of all source files, and binaries won't get rebuilt when one of the go files change. This commit adds quoting around `*.go` so that this works properly. Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
1 parent 0b5de9b commit 16cf22d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ ORG := github.com/crc-org
3636
MODULEPATH = $(ORG)/crc/v2
3737
PACKAGE_DIR := packaging/$(GOOS)
3838

39-
SOURCES := $(shell git ls-files *.go ":^vendor")
39+
SOURCES := $(shell git ls-files '*.go' ":^vendor")
4040

4141
RELEASE_INFO := release-info.json
4242

0 commit comments

Comments
 (0)