Mercurial > hg
comparison contrib/dockerdeb @ 26108:05306b9359d3
builddeb: rework how output dir and platform are specified
This makes it possible to write tests for both builddeb and dockerdeb
that actually build .debs and then sanity check the contents.
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 25 Aug 2015 00:02:44 -0400 |
parents | 4c4d0012db4f |
children | 7f49efcaa9b4 |
comparison
equal
deleted
inserted
replaced
26107:50582df9d7a7 | 26108:05306b9359d3 |
---|---|
6 BUILDDIR=$(dirname $0) | 6 BUILDDIR=$(dirname $0) |
7 export ROOTDIR=$(cd $BUILDDIR/..; pwd) | 7 export ROOTDIR=$(cd $BUILDDIR/..; pwd) |
8 | 8 |
9 checkdocker | 9 checkdocker |
10 | 10 |
11 DEBPLATFORM="$1" | |
11 PLATFORM="debian-$1" | 12 PLATFORM="debian-$1" |
12 shift # extra params are passed to build process | 13 shift # extra params are passed to build process |
13 | 14 |
14 initcontainer $PLATFORM | 15 initcontainer $PLATFORM |
15 | 16 |
16 DEBBUILDDIR=$ROOTDIR/packages/$PLATFORM | 17 DEBBUILDDIR=${OUTPUTDIR:=$ROOTDIR/packages/$PLATFORM} |
17 contrib/builddeb --debbuilddir $DEBBUILDDIR/staged --prepare | 18 OUTPUTDIR=$DEBBUILDDIR/staged contrib/builddeb --release $DEBPLATFORM --prepare |
18 | 19 |
19 DSHARED=/mnt/shared/ | 20 DSHARED=/mnt/shared/ |
20 if [ $(uname) = "Darwin" ] ; then | 21 if [ $(uname) = "Darwin" ] ; then |
21 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \ | 22 $DOCKER run -u $DBUILDUSER --rm -v $DEBBUILDDIR:$DSHARED -v $PWD:/mnt/hg $CONTAINER \ |
22 sh -c "cd /mnt/hg && make clean && make local" | 23 sh -c "cd /mnt/hg && make clean && make local" |