File: build-debs.sh

package info (click to toggle)
anbox 0.0~git20190124-1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 22,000 kB
  • sloc: cpp: 76,190; ansic: 7,434; sh: 1,350; xml: 818; java: 780; python: 390; makefile: 35; lisp: 7
file content (34 lines) | stat: -rwxr-xr-x 765 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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"