mirror of https://github.com/docker/cli.git
Merge pull request #5397 from thaJeztah/25.0_backport_fix_plugins_CGO_ENABLED
[25.0 backport] scripts/build/plugins: don't override CGO_ENABLED set by .variables
This commit is contained in:
commit
1c5ff8a32d
|
@ -5,6 +5,12 @@
|
||||||
|
|
||||||
set -eu -o pipefail
|
set -eu -o pipefail
|
||||||
|
|
||||||
|
# Disable CGO - we don't need it for these plugins.
|
||||||
|
#
|
||||||
|
# Important: this must be done before sourcing "./scripts/build/.variables",
|
||||||
|
# because some other variables are conditionally set whether CGO is enabled.
|
||||||
|
export CGO_ENABLED=0
|
||||||
|
|
||||||
source ./scripts/build/.variables
|
source ./scripts/build/.variables
|
||||||
|
|
||||||
for p in cli-plugins/examples/* "$@" ; do
|
for p in cli-plugins/examples/* "$@" ; do
|
||||||
|
@ -15,5 +21,5 @@ for p in cli-plugins/examples/* "$@" ; do
|
||||||
mkdir -p "$(dirname "${TARGET_PLUGIN}")"
|
mkdir -p "$(dirname "${TARGET_PLUGIN}")"
|
||||||
|
|
||||||
echo "Building $GO_LINKMODE $(basename "${TARGET_PLUGIN}")"
|
echo "Building $GO_LINKMODE $(basename "${TARGET_PLUGIN}")"
|
||||||
(set -x ; CGO_ENABLED=0 GO111MODULE=auto go build -o "${TARGET_PLUGIN}" -tags "${GO_BUILDTAGS}" -ldflags "${GO_LDFLAGS}" ${GO_BUILDMODE} "github.com/docker/cli/${p}")
|
(set -x ; GO111MODULE=auto go build -o "${TARGET_PLUGIN}" -tags "${GO_BUILDTAGS}" -ldflags "${GO_LDFLAGS}" ${GO_BUILDMODE} "github.com/docker/cli/${p}")
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue