Skip to content

Commit 7dc1f3e

Browse files
committed
golang: Install go.mod/go.sum by default
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
1 parent a80d54f commit 7dc1f3e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lang/golang/golang-package.mk

+4-1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ include $(GO_INCLUDE_DIR)/golang-values.mk
3232
#
3333
# * Files in any 'testdata' directory
3434
#
35+
# * go.mod and go.sum, in any directory
36+
#
3537
# e.g. GO_PKG_INSTALL_EXTRA:=example.toml marshal_test.toml
3638
#
3739
#
@@ -155,12 +157,13 @@ define GoPackage/Build/Configure
155157
if [ "$(GO_PKG_INSTALL_ALL)" != 1 ]; then \
156158
code=$$$$(echo "$$$$files" | grep '\.\(c\|cc\|cpp\|go\|h\|hh\|hpp\|proto\|s\)$$$$') ; \
157159
testdata=$$$$(echo "$$$$files" | grep '\(^\|/\)testdata/') ; \
160+
gomod=$$$$(echo "$$$$files" | grep '\(^\|/\)go\.\(mod\|sum\)$$$$') ; \
158161
\
159162
for pattern in $(GO_PKG_INSTALL_EXTRA); do \
160163
extra=$$$$(echo "$$$$extra"; echo "$$$$files" | grep "$$$$pattern") ; \
161164
done ; \
162165
\
163-
files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$extra") ; \
166+
files=$$$$(echo "$$$$code"; echo "$$$$testdata"; echo "$$$$gomod"; echo "$$$$extra") ; \
164167
files=$$$$(echo "$$$$files" | grep -v '^[[:space:]]*$$$$' | sort -u) ; \
165168
fi ; \
166169
\

0 commit comments

Comments
 (0)