summaryrefslogtreecommitdiff
path: root/hack/make.sh
diff options
context:
space:
mode:
Diffstat (limited to 'hack/make.sh')
-rwxr-xr-xhack/make.sh37
1 files changed, 34 insertions, 3 deletions
diff --git a/hack/make.sh b/hack/make.sh
index 63edca4d4c..e81271370d 100755
--- a/hack/make.sh
+++ b/hack/make.sh
@@ -43,6 +43,7 @@ DEFAULT_BUNDLES=(
binary
test
test-integration
+ test-integration-cli
dynbinary
dyntest
dyntest-integration
@@ -89,7 +90,7 @@ LDFLAGS='
'
LDFLAGS_STATIC='-linkmode external'
EXTLDFLAGS_STATIC='-static'
-BUILDFLAGS=( -a -tags "netgo $DOCKER_BUILDTAGS" )
+BUILDFLAGS=( -a -tags "netgo static_build $DOCKER_BUILDTAGS" )
# A few more flags that are specific just to building a completely-static binary (see hack/make/binary)
# PLEASE do not use these anywhere else.
@@ -125,7 +126,7 @@ go_test_dir() {
testcover=( -cover -coverprofile "$coverprofile" $coverpkg )
fi
(
- set -x
+ echo '+ go test' $TESTFLAGS "github.com/dotcloud/docker${dir#.}"
cd "$dir"
go test ${testcover[@]} -ldflags "$LDFLAGS" "${BUILDFLAGS[@]}" $TESTFLAGS
)
@@ -136,11 +137,41 @@ go_test_dir() {
# output, one per line.
find_dirs() {
find -not \( \
- \( -wholename './vendor' -o -wholename './integration' -o -wholename './contrib' -o -wholename './pkg/mflag/example' \) \
+ \( \
+ -wholename './vendor' \
+ -o -wholename './integration' \
+ -o -wholename './integration-cli' \
+ -o -wholename './contrib' \
+ -o -wholename './pkg/mflag/example' \
+ -o -wholename './.git' \
+ -o -wholename './bundles' \
+ -o -wholename './docs' \
+ \) \
-prune \
\) -name "$1" -print0 | xargs -0n1 dirname | sort -u
}
+hash_files() {
+ while [ $# -gt 0 ]; do
+ f="$1"
+ shift
+ dir="$(dirname "$f")"
+ base="$(basename "$f")"
+ for hashAlgo in md5 sha256; do
+ if command -v "${hashAlgo}sum" &> /dev/null; then
+ (
+ # subshell and cd so that we get output files like:
+ # $HASH docker-$VERSION
+ # instead of:
+ # $HASH /go/src/github.com/.../$VERSION/binary/docker-$VERSION
+ cd "$dir"
+ "${hashAlgo}sum" "$base" > "$base.$hashAlgo"
+ )
+ fi
+ done
+ done
+}
+
bundle() {
bundlescript=$1
bundle=$(basename $bundlescript)