Mercurial > public > mercurial-scm > hg
diff contrib/packaging/dockerdeb @ 38013:917f635b5c6a
packaging: make packaging scripts less reliant on pwd
The scripts currently assume they are executed from the repo root.
This feels like an arbitrary restriction. Let's fix that.
Differential Revision: https://phab.mercurial-scm.org/D3551
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 12 May 2018 12:27:51 -0700 |
parents | 64b086f0ebb5 |
children | 11eda1f1b6e7 |
line wrap: on
line diff
--- a/contrib/packaging/dockerdeb Sat May 12 10:57:04 2018 -0700 +++ b/contrib/packaging/dockerdeb Sat May 12 12:27:51 2018 -0700 @@ -20,13 +20,13 @@ # debuild only appears to be able to save built debs etc to .., so we # have to share the .. of the current directory with the docker # container and hope it's writable. Whee. -dn=$(basename $PWD) +dn=$(basename $ROOTDIR) if [ $(uname) = "Darwin" ] ; then $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ sh -c "cd /mnt/$dn && make clean && make local" fi -$DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \ +$DOCKER run -u $DBUILDUSER --rm -v $ROOTDIR/..:/mnt $CONTAINER \ sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/packaging/builddeb --build --distid $DISTID --codename $CODENAME $@" contrib/packaging/builddeb --cleanup --distid $DISTID --codename $CODENAME if [ $(uname) = "Darwin" ] ; then