From: Adam Dickmeiss Date: Thu, 12 Jan 2017 09:02:39 +0000 (+0100) Subject: Rename build deb script for Docker X-Git-Url: http://jira.indexdata.com/?a=commitdiff_plain;h=a384750daf80175f62b4055827af124e4d398f76;p=git-tools-moved-to-github.git Rename build deb script for Docker --- diff --git a/id-deb-build/docker-build.sh b/id-deb-build/docker-build.sh index c8bde88..bcacb66 100755 --- a/id-deb-build/docker-build.sh +++ b/id-deb-build/docker-build.sh @@ -39,7 +39,7 @@ prepare_deb() test -f build/$TYPE/$dist && sudo rm -fr build/$TYPE/$dist mkdir -p build/$TYPE cp -a deb-src build/$TYPE/$dist - cp ${ID_DEB_BUILD}/in-docker.sh build/$TYPE/$dist + cp ${ID_DEB_BUILD}/in-docker-deb.sh build/$TYPE/$dist done } @@ -51,12 +51,13 @@ run_deb() for dist in ${DISTS}; do cd build/$TYPE/$dist echo "FROM $TYPE:$dist" >Dockerfile + echo "ENV DEBIAN_FRONTEND noninteractive" >>Dockerfile echo 'RUN apt-get update && apt-get -q install -y wget devscripts equivs' >>Dockerfile echo 'RUN wget -q -O - http://ftp.indexdata.dk/debian/indexdata.asc|apt-key add -' >>Dockerfile echo "RUN echo \"deb http://ftp.indexdata.dk/$TYPE $dist main\" >/etc/apt/sources.list.d/indexdata.list" >>Dockerfile docker build -t indexdata-build-$TYPE:$dist . echo -n "$TYPE $dist " - docker run --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION indexdata-build-$TYPE:$dist ../in-docker.sh >log 2>&1 + docker run --rm -v "$PWD:/build" -w /build/$PRODUCT-$VERSION indexdata-build-$TYPE:$dist ../in-docker-deb.sh >log 2>&1 if test $? -eq 0; then echo Done else diff --git a/id-deb-build/in-docker-deb.sh b/id-deb-build/in-docker-deb.sh new file mode 100755 index 0000000..c48a9eb --- /dev/null +++ b/id-deb-build/in-docker-deb.sh @@ -0,0 +1,23 @@ +#!/bin/sh +# in-docker.sh + +set -x +DEBIAN_FRONTEND=noninteractive +export DEBIAN_FRONTEND + +# we want the newest Index Data packages +apt-get update +mk-build-deps +dpkg -i *-build-deps_*_all.deb || apt-get -q install -f -y +rm *-build-deps_*_all.deb +dpkg-buildpackage -rfakeroot +RET=$? + +exit $RET + +# Local Variables: +# mode:shell-script +# sh-indentation: 4 +# sh-basic-offset: 4 +# End: + diff --git a/id-deb-build/in-docker.sh b/id-deb-build/in-docker.sh deleted file mode 100755 index c48a9eb..0000000 --- a/id-deb-build/in-docker.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# in-docker.sh - -set -x -DEBIAN_FRONTEND=noninteractive -export DEBIAN_FRONTEND - -# we want the newest Index Data packages -apt-get update -mk-build-deps -dpkg -i *-build-deps_*_all.deb || apt-get -q install -f -y -rm *-build-deps_*_all.deb -dpkg-buildpackage -rfakeroot -RET=$? - -exit $RET - -# Local Variables: -# mode:shell-script -# sh-indentation: 4 -# sh-basic-offset: 4 -# End: -