X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=blobdiff_plain;f=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fscripts%2Fbuild-debs.sh;fp=src%2Ftype3_AndroidCloud%2Fanbox-master%2Fscripts%2Fbuild-debs.sh;h=b750ca057b1c60662562fc3e2720eed20517843d;hb=e26c1ec581be598521517829adba8c8dd23a768f;hp=0000000000000000000000000000000000000000;hpb=6699c1aea74eeb0eb400e6299079f0c7576f716f;p=iec.git diff --git a/src/type3_AndroidCloud/anbox-master/scripts/build-debs.sh b/src/type3_AndroidCloud/anbox-master/scripts/build-debs.sh new file mode 100644 index 0000000..b750ca0 --- /dev/null +++ b/src/type3_AndroidCloud/anbox-master/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"