...

Text file src/github.com/docker/cli/scripts/build/plugins

Documentation: github.com/docker/cli/scripts/build

     1#!/usr/bin/env bash
     2#
     3# Build plugins examples for the host OS/ARCH
     4#
     5
     6set -eu -o pipefail
     7
     8source ./scripts/build/.variables
     9
    10for p in cli-plugins/examples/* "$@" ; do
    11    [ -d "$p" ] || continue
    12
    13    n=$(basename "$p")
    14    TARGET_PLUGIN="$(dirname "${TARGET}")/plugins-${GOOS}-${GOARCH}/docker-${n}"
    15    mkdir -p "$(dirname "${TARGET_PLUGIN}")"
    16
    17    echo "Building $GO_LINKMODE $(basename "${TARGET_PLUGIN}")"
    18    (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}")
    19done

View as plain text