Skip to content

Commit

Permalink
build: Ensure binaries are rebuilt on any source change
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
cfergeau committed Jul 30, 2024
1 parent 0b5de9b commit 16cf22d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ORG := github.com/crc-org
MODULEPATH = $(ORG)/crc/v2
PACKAGE_DIR := packaging/$(GOOS)

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

RELEASE_INFO := release-info.json

Expand Down

0 comments on commit 16cf22d

Please sign in to comment.