File: plugins

package info (click to toggle)
docker.io 26.1.5%2Bdfsg1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 68,576 kB
  • sloc: sh: 5,748; makefile: 912; ansic: 664; asm: 228; python: 162
file content (19 lines) | stat: -rwxr-xr-x 588 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/usr/bin/env bash
#
# Build plugins examples for the host OS/ARCH
#

set -eu -o pipefail

source ./scripts/build/.variables

for p in cli-plugins/examples/* "$@" ; do
    [ -d "$p" ] || continue

    n=$(basename "$p")
    TARGET_PLUGIN="$(dirname "${TARGET}")/plugins-${GOOS}-${GOARCH}/docker-${n}"
    mkdir -p "$(dirname "${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}")
done