From df45f203cbcdaadeabee83094b4697ef219ec166 Mon Sep 17 00:00:00 2001 From: Maciej Nabozny Date: Wed, 28 Mar 2018 16:12:20 +0200 Subject: [PATCH] Build script --- build.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/build.sh b/build.sh index a24f976..74c4700 100755 --- a/build.sh +++ b/build.sh @@ -6,6 +6,8 @@ FLAVORS=( deb rpm tar sh ) PACKAGES=( corecluster corecluster-algorithm-id-uuid corecluster-algorithm-node-fillup corecluster-algorithm-node-median corecluster-algorithm-storage-default corecluster-auth-db corecluster-storage-libvirt corecluster-storage-sheepdog corecluster-storage-ssh coredhcp coremetry corenetwork corenode coretalk corevpn ) BUILDDIR=/data/build/ +DEB_VERSIONS=( stretch xenial yakkety zasty artful ) + for NAME in "${PACKAGES[@]}" ; do rm -rf $BUILDDIR/build-repo-$NAME git clone https://github.com/cloudover/$NAME $BUILDDIR/build-repo-$NAME @@ -35,13 +37,21 @@ for NAME in "${PACKAGES[@]}" ; do --config-files /etc/$NAME \ -C $BUILDDIR/build-$NAME . mv $NAME*.$FLAVOR $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR - #aptly repo add cloudover $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR + + aptly repo add cloudover $BUILDDIR/packages/$VERSION/$FLAVOR/$NAME-$VERSION.$FLAVOR done + cd $BUILDDIR/packages/$VERSION/deb/ - dpkg-scanpackages . | gzip > $BUILDDIR/packages/$VERSION/deb/Packages.gz + # dpkg-scanpackages . | gzip > $BUILDDIR/packages/$VERSION/deb/Packages.gz cd $pwd done +aptly snapshot create $VERSION from cloudover +for DISTRO in "${DEB_VERSIONS[@]}" ; do + aptly publish snapshot -distribution $DISTRO -architectures=all $VERSION + aptly publish switch -distribution $DISTRO -architectures=all $VERSION +done + if ! [ "x$1" == "x" ] ; then - rsync -av $BUILDDIR/packages/$VERSION $1 + rsync -av ~/.aptly/public/ $1 fi