Merge pull request #46219 from thaJeztah/24.0_backport_with-go-mod_ROOTDIR
[24.0 backport] hack: use Git-free ROOTDIR
This commit is contained in:
commit
6f8cf86c30
5 changed files with 5 additions and 5 deletions
|
@ -599,7 +599,7 @@ RUN <<EOT
|
|||
XX_CC_PREFER_LINKER=ld xx-clang --setup-target-triple
|
||||
fi
|
||||
EOT
|
||||
RUN --mount=type=bind,target=. \
|
||||
RUN --mount=type=bind,target=.,rw \
|
||||
--mount=type=tmpfs,target=cli/winresources/dockerd \
|
||||
--mount=type=tmpfs,target=cli/winresources/docker-proxy \
|
||||
--mount=type=cache,target=/root/.cache/go-build,id=moby-build-$TARGETPLATFORM <<EOT
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
set -e
|
||||
|
||||
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)"
|
||||
ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)"
|
||||
|
||||
set -x
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ source "${MAKEDIR}/.go-autogen"
|
|||
if [ -n "$DOCKER_DEBUG" ]; then
|
||||
set -x
|
||||
fi
|
||||
go build -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" ${GO_PACKAGE}
|
||||
./hack/with-go-mod.sh go build -mod=vendor -modfile=vendor.mod -o "$DEST/$BINARY_FULLNAME" "${BUILDFLAGS[@]}" -ldflags "$LDFLAGS $LDFLAGS_STATIC $DOCKER_LDFLAGS" "$GO_PACKAGE"
|
||||
)
|
||||
|
||||
echo "Created binary: $DEST/$BINARY_FULLNAME"
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# Check that no one is trying to commit a go.mod.
|
||||
|
||||
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)"
|
||||
ROOTDIR="$(cd "${SCRIPTDIR}/../.." && pwd)"
|
||||
|
||||
if test -e "${ROOTDIR}/go.mod"; then
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
set -e
|
||||
|
||||
SCRIPTDIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOTDIR="$(git -C "$SCRIPTDIR" rev-parse --show-toplevel)"
|
||||
ROOTDIR="$(cd "${SCRIPTDIR}/.." && pwd)"
|
||||
|
||||
if test -e "${ROOTDIR}/go.mod"; then
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue