Skip to content

Commit

Permalink
Export GOOS and GOARCH in subprocess for tgz
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Crosby <[email protected]>
  • Loading branch information
crosbymichael committed Mar 22, 2016
1 parent aca7e73 commit 5ff6674
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions hack/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,12 @@ copy_containerd() {
cp /usr/local/bin/ctr "$dir/"
cp /usr/local/bin/containerd "$dir/"
cp /usr/local/bin/containerd-shim "$dir/"
hash_files "$dir/runc"
hash_files "$dir/ctr"
hash_files "$dir/containerd"
hash_files "$dir/containerd-shim"
if [ "$2" == "hash" ]; then
hash_files "$dir/runc"
hash_files "$dir/ctr"
hash_files "$dir/containerd"
hash_files "$dir/containerd-shim"
fi
fi
)
fi
Expand Down
2 changes: 1 addition & 1 deletion hack/make/binary
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ go build \
echo "Created binary: $DEST/$BINARY_FULLNAME"
ln -sf "$BINARY_FULLNAME" "$DEST/docker$BINARY_EXTENSION"

copy_containerd "$DEST"
copy_containerd "$DEST" "hash"
hash_files "$DEST/$BINARY_FULLNAME"
2 changes: 1 addition & 1 deletion hack/make/gccgo
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ go build -compiler=gccgo \
echo "Created binary: $DEST/$BINARY_FULLNAME"
ln -sf "$BINARY_FULLNAME" "$DEST/docker$BINARY_EXTENSION"

copy_containerd "$DEST"
copy_containerd "$DEST" "hash"
hash_files "$DEST/$BINARY_FULLNAME"
6 changes: 4 additions & 2 deletions hack/make/tgz
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ if [ ! -d "$CROSS/linux/amd64" ]; then
false
fi

(
for d in "$CROSS/"*/*; do
GOARCH="$(basename "$d")"
GOOS="$(basename "$(dirname "$d")")"
export GOARCH="$(basename "$d")"
export GOOS="$(basename "$(dirname "$d")")"
BINARY_NAME="docker-$VERSION"
BINARY_EXTENSION="$(export GOOS && binary_extension)"
BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
Expand All @@ -32,3 +33,4 @@ for d in "$CROSS/"*/*; do

echo "Created tgz: $TGZ"
done
)

0 comments on commit 5ff6674

Please sign in to comment.