mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
3e10b93106
Signed-off-by: Michael Hudson-Doyle <michael.hudson@linaro.org>
28 lines
470 B
Bash
Executable file
28 lines
470 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
DEST=$1
|
|
|
|
: ${IAMSTATIC:=true}
|
|
|
|
cat > dockerversion/static.go <<EOF
|
|
// AUTOGENERATED FILE; see hack/make/binary and hack/make/dynbinary
|
|
package dockerversion
|
|
|
|
func init() {
|
|
IAMSTATIC = $IAMSTATIC
|
|
}
|
|
EOF
|
|
|
|
go build \
|
|
-o "$DEST/docker-$VERSION" \
|
|
"${BUILDFLAGS[@]}" \
|
|
-ldflags "
|
|
$LDFLAGS
|
|
$LDFLAGS_STATIC_DOCKER
|
|
" \
|
|
./docker
|
|
echo "Created binary: $DEST/docker-$VERSION"
|
|
ln -sf "docker-$VERSION" "$DEST/docker"
|
|
|
|
hash_files "$DEST/docker-$VERSION"
|