2013-12-02 17:48:26 -05:00
|
|
|
#!/bin/bash
|
2014-04-08 00:14:19 -04:00
|
|
|
set -e
|
2013-09-09 21:45:40 -04:00
|
|
|
|
|
|
|
DEST=$1
|
|
|
|
|
2014-09-30 20:37:30 -04:00
|
|
|
: ${IAMSTATIC:=true}
|
|
|
|
|
|
|
|
cat > dockerversion/static.go <<EOF
|
|
|
|
// AUTOGENERATED FILE; see hack/make/binary and hack/make/dynbinary
|
|
|
|
package dockerversion
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
IAMSTATIC = $IAMSTATIC
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
|
2014-03-06 21:55:22 -05:00
|
|
|
go build \
|
2014-03-19 21:58:39 -04:00
|
|
|
-o "$DEST/docker-$VERSION" \
|
2014-03-06 21:55:22 -05:00
|
|
|
"${BUILDFLAGS[@]}" \
|
|
|
|
-ldflags "
|
|
|
|
$LDFLAGS
|
|
|
|
$LDFLAGS_STATIC_DOCKER
|
|
|
|
" \
|
|
|
|
./docker
|
2013-10-04 22:25:15 -04:00
|
|
|
echo "Created binary: $DEST/docker-$VERSION"
|
2014-03-20 18:46:55 -04:00
|
|
|
ln -sf "docker-$VERSION" "$DEST/docker"
|
2014-03-16 17:10:59 -04:00
|
|
|
|
2014-03-19 21:58:39 -04:00
|
|
|
hash_files "$DEST/docker-$VERSION"
|