From b723f251d9fda147c08a6962a99ae471872b51eb Mon Sep 17 00:00:00 2001 From: Simon Fels Date: Wed, 23 May 2018 11:45:15 +0200 Subject: [PATCH] debian: bump version and add build script --- debian/changelog | 6 ++++++ debian/rules | 3 --- scripts/build-debs.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) create mode 100755 scripts/build-debs.sh diff --git a/debian/changelog b/debian/changelog index 2f89091..a23ddfb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +anbox (10) bionic; urgency=medium + + * Bump version + + -- Simon Fels Wed, 23 May 2018 11:05:05 +0200 + anbox (8) artful; urgency=medium * Drop upstart/systemctl session jobs diff --git a/debian/rules b/debian/rules index 9874b48..c2d7a6a 100755 --- a/debian/rules +++ b/debian/rules @@ -28,7 +28,4 @@ override_dh_install: install -d $(CURDIR)/debian/tmp/etc/modules-load.d install -m 0644 kernel/anbox.conf $(CURDIR)/debian/tmp/etc/modules-load.d - install -d $(CURDIR)/debian/tmp/etc/X11/Xsession.d - install -m 0644 data/xsession.conf $(CURDIR)/debian/tmp/etc/X11/Xsession.d/68anbox - dh_install diff --git a/scripts/build-debs.sh b/scripts/build-debs.sh new file mode 100755 index 0000000..b750ca0 --- /dev/null +++ b/scripts/build-debs.sh @@ -0,0 +1,34 @@ +#!/bin/sh + +set -ex + +debuild_args="$@" + +if [ -z "$BUILD_ID" ]; then + BUILD_ID=1 +fi + +build_and_publish_package() { + dir="$1" + distro="$2" + ppa="$3" + + cd $dir + + git checkout -- debian/changelog + + # Bump the current version by a minor number. Having the distro parse + # at the end with current date, git rev and build id will do the rest. + new_base_version=$(dpkg-parsechangelog --show-field Version).1 + dch --newversion "$new_base_version~$(date +%Y%m%d).$BUILD_ID.$distro.$(git rev-parse --short HEAD)" \ + -D "$distro" "Nightly release" + + debuild -S -sa -I "$debuild_args" + cd .. + dput "$ppa" *.changes +} + +top_dir="$PWD" + +build_and_publish_package "$top_dir" xenial "ppa:morphis/anbox-support" +build_and_publish_package "$top_dir" bionic "ppa:morphis/anbox-support"