Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSami Hiltunen <shiltunen@gitlab.com>2022-07-26 17:38:41 +0300
committerSami Hiltunen <shiltunen@gitlab.com>2022-07-26 17:38:41 +0300
commit5ff293bf6c1098900974b0e3e5e619f90d9d56d7 (patch)
tree55bf7497ad1579dda75b62dfdb1ad92bae143742
parentd5e96de87a0f4fe222071d9abe5efc788fa0b13c (diff)
Remove legacy go.mod and go.sum files from _build directorysmh-remove-legacy-go-mod
The build process left a go.mod and go.sum file in the _build directory in the past. This causes problems these days when attempting to embed the auxiliary binaries into Gitaly binary as they are considered to be in a different module due to this. Remove the legacy files prior to building Gitaly.
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 06cec69a8..5c0addbfb 100644
--- a/Makefile
+++ b/Makefile
@@ -599,8 +599,15 @@ ${BUILD_DIR}/bin/%: ${BUILD_DIR}/intermediate/% | ${BUILD_DIR}/bin
install "$<" "$@"; \
fi
+# The build process left a go.mod and go.sum file in ${BUILD_DIR} in the past. This causes problems these days
+# when attempting to embed the auxiliary binaries into Gitaly binary as they are considered to be in a different
+# module due to this. Remove the legacy files.
+.PHONY: remove-legacy-go-mod
+remove-legacy-go-mod:
+ ${Q}rm -f $(addprefix ${BUILD_DIR}/, go.mod go.sum)
+
${BUILD_DIR}/intermediate/gitaly: GO_BUILD_TAGS = ${SERVER_BUILD_TAGS}
-${BUILD_DIR}/intermediate/gitaly: ${GITALY_PACKED_EXECUTABLES}
+${BUILD_DIR}/intermediate/gitaly: remove-legacy-go-mod ${GITALY_PACKED_EXECUTABLES}
${BUILD_DIR}/intermediate/praefect: GO_BUILD_TAGS = ${SERVER_BUILD_TAGS}
${BUILD_DIR}/intermediate/gitaly-git2go-v15: GO_BUILD_TAGS = ${GIT2GO_BUILD_TAGS}
${BUILD_DIR}/intermediate/gitaly-git2go-v15: libgit2