2018-03-06 10:32:47 -05:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
set -e
|
2018-03-06 10:41:43 -05:00
|
|
|
|
|
|
|
if [[ -z "$DEB_VERSION" ]]; then
|
|
|
|
echo "DEB_VERSION is required to build deb packages"
|
2018-03-06 10:32:47 -05:00
|
|
|
exit 1
|
|
|
|
fi
|
2018-03-06 10:41:43 -05:00
|
|
|
|
|
|
|
(
|
|
|
|
set -e
|
|
|
|
cd engine
|
|
|
|
# I want to rip this install-binaries script out so badly
|
|
|
|
for component in tini proxy runc containerd;do
|
|
|
|
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
|
|
|
|
done
|
|
|
|
)
|
|
|
|
|
2018-03-06 10:32:47 -05:00
|
|
|
echo VERSION AAA $VERSION
|
|
|
|
|
|
|
|
VERSION=${VERSION:-$( cat engine/VERSION )}
|
|
|
|
|
|
|
|
echo VERSION bbb $VERSION
|
2018-03-06 10:41:43 -05:00
|
|
|
|
2018-03-06 10:32:47 -05:00
|
|
|
debSource="$(awk -F ': ' '$1 == "Source" { print $2; exit }' debian/control)"
|
|
|
|
debMaintainer="$(awk -F ': ' '$1 == "Maintainer" { print $2; exit }' debian/control)"
|
|
|
|
debDate="$(date --rfc-2822)"
|
|
|
|
|
|
|
|
cat > "debian/changelog" <<-EOF
|
2018-03-06 10:41:43 -05:00
|
|
|
$debSource (${DEB_VERSION}-0~${DISTRO}) $SUITE; urgency=low
|
2018-03-06 10:32:47 -05:00
|
|
|
* Version: $VERSION
|
|
|
|
-- $debMaintainer $debDate
|
|
|
|
EOF
|
|
|
|
# The space above at the start of the line for the debMaintainer is very important
|
|
|
|
|
|
|
|
# Give the script a git commit because it wants it
|
|
|
|
export DOCKER_GITCOMMIT=${DOCKER_GITCOMMIT-$($GIT_COMMAND rev-parse --short HEAD)}
|
|
|
|
|
|
|
|
echo VERSION BBB $VERSION
|
|
|
|
dpkg-buildpackage -uc -us -I.git
|
|
|
|
destination="/build"
|
|
|
|
mkdir -p "$destination"
|
|
|
|
mv -v /root/docker-ce* "$destination"
|