github.com/docker/buildx@v0.14.1-0.20240514123050-afcb609966dc/hack/build (about) 1 #!/usr/bin/env sh 2 3 set -e 4 5 : "${DESTDIR=./bin/build}" 6 : "${PACKAGE=github.com/docker/buildx}" 7 : "${VERSION=$(./hack/git-meta version)}" 8 : "${REVISION=$(./hack/git-meta revision)}" 9 10 : "${CGO_ENABLED=0}" 11 : "${GO_PKG=github.com/docker/buildx}" 12 : "${GO_EXTRA_FLAGS=}" 13 : "${GO_LDFLAGS=-X ${GO_PKG}/version.Version=${VERSION} -X ${GO_PKG}/version.Revision=${REVISION} -X ${GO_PKG}/version.Package=${PACKAGE}}" 14 : "${GO_EXTRA_LDFLAGS=}" 15 16 set -x 17 CGO_ENABLED=$CGO_ENABLED go build -mod vendor -trimpath ${GO_EXTRA_FLAGS} -ldflags "${GO_LDFLAGS} ${GO_EXTRA_LDFLAGS}" -o "${DESTDIR}/docker-buildx" ./cmd/buildx