Files
docker-cli/components/packaging/deb/build-deb
Eli Uriegas 72a2de1d85 Be less restrictive when moving packages
Signed-off-by: Eli Uriegas <eli.uriegas@docker.com>
Upstream-commit: 941d99ff6ae57bc06b06b85b7b07210301f454b2
Component: packaging
2018-03-19 21:26:38 +00:00

50 lines
1.3 KiB
Bash
Executable File

#!/usr/bin/env bash
set -x
set -e
EPOCH="${EPOCH:-}"
EPOCH_SEP=""
if [[ ! -z "$EPOCH" ]]; then
EPOCH_SEP=":"
fi
if [[ -z "$DEB_VERSION" ]]; then
echo "DEB_VERSION is required to build deb packages"
exit 1
fi
(
set -e
cd engine
# I want to rip this install-binaries script out so badly
for component in tini "proxy dynamic" "runc all" "containerd dynamic";do
TMP_GOPATH="/go" hack/dockerfile/install/install.sh $component
done
)
echo VERSION AAA $VERSION
VERSION=${VERSION:-$( cat engine/VERSION )}
echo VERSION bbb $VERSION
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
$debSource (${EPOCH}${EPOCH_SEP}${DEB_VERSION}-0~${DISTRO}) $SUITE; urgency=low
* 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* "$destination"