mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-21 05:53:09 +00:00
.
This commit is contained in:
parent
4d30f60bbe
commit
0588589d57
@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
export PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
|
export PATH=/bin:/usr/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/sbin
|
||||||
|
|
||||||
if [ $# = 0 ]; then
|
subdirs=$*
|
||||||
echo 'Usage: ./build.sh <distribution-name> [<distribution-name>] ...'
|
if [ ! -n "$subdirs" ]; then
|
||||||
exit 1
|
subdirs=`find . -type d -name '*-*' -printf '%f '`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d ./ubuntu-trusty ]; then
|
if [ ! -d ./ubuntu-trusty ]; then
|
||||||
@ -20,10 +20,12 @@ cd linux-build-farm
|
|||||||
# Note that --privileged is used so we can bind mount VM shares when building in a VM.
|
# Note that --privileged is used so we can bind mount VM shares when building in a VM.
|
||||||
# It has no other impact or purpose, but probably doesn't matter here in any case.
|
# It has no other impact or purpose, but probably doesn't matter here in any case.
|
||||||
|
|
||||||
for distro in $*; do
|
for distro in $subdirs; do
|
||||||
cd $distro
|
echo
|
||||||
|
echo "--- BUILDING FOR $distro ---"
|
||||||
|
echo
|
||||||
|
|
||||||
rm -f *.deb
|
cd $distro
|
||||||
|
|
||||||
cd x64
|
cd x64
|
||||||
mv ../../zt1-src.tar.gz .
|
mv ../../zt1-src.tar.gz .
|
||||||
@ -31,15 +33,21 @@ for distro in $*; do
|
|||||||
mv zt1-src.tar.gz ../..
|
mv zt1-src.tar.gz ../..
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
|
|
||||||
|
|
||||||
cd x86
|
cd x86
|
||||||
mv ../../zt1-src.tar.gz .
|
mv ../../zt1-src.tar.gz .
|
||||||
docker build -t zt1-build-${distro}-x86 .
|
docker build -t zt1-build-${distro}-x86 .
|
||||||
mv zt1-src.tar.gz ../..
|
mv zt1-src.tar.gz ../..
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
# docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
|
rm -f *.deb *.rpm
|
||||||
|
|
||||||
|
if [ -e "`echo $distro | grep -F debian`" -a -e "`echo $distro | grep -F ubuntu`" ]; then
|
||||||
|
docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
|
||||||
|
docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make redhat ; cd .. ; cp `find /root/rpmbuild -type f -name *.rpm` /artifacts ; ls -l /artifacts'
|
||||||
|
else
|
||||||
|
docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x64 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
|
||||||
|
docker run --rm -v `pwd`:/artifacts --privileged -it zt1-build-${distro}-x86 /bin/bash -c 'cd /ZeroTierOne ; make debian ; cd .. ; cp *.deb /artifacts ; ls -l /artifacts'
|
||||||
|
fi
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user