ubuntu_ppa 756 Bytes
Newer Older
1 2
#! /bin/bash

3 4 5
tmpdir=`mktemp -d`
long_version=`git describe --always --tags`
short_version=`git describe --always --tags | cut -d "-" -f 1,2`
6

7 8 9
version=${long_version:1}
dir_version=${short_version:1}
echo $version
10

Daniel Agar's avatar
Daniel Agar committed
11
debchange -v ${version} --distribution trusty --package qgroundcontrol --create --empty
12

Daniel Agar's avatar
Daniel Agar committed
13
rsync -a --delete --exclude={build-release,release,Makefile\*} . ${tmpdir}/qgroundcontrol-${dir_version}/
14

15 16 17 18
cd ${tmpdir}
tar pczf qgroundcontrol_${dir_version}.orig.tar.gz qgroundcontrol-${dir_version}

cd ${tmpdir}/qgroundcontrol-${dir_version}/
Daniel Agar's avatar
Daniel Agar committed
19
debuild -S -uc -us
20

Daniel Agar's avatar
Daniel Agar committed
21 22
# build locally
debuild --prepend-path=/usr/lib/ccache -uc -us -sa -B -i -I -j4
23

Daniel Agar's avatar
Daniel Agar committed
24 25
# upload to launchpad
#dput -f ppa:qgroundcontrol/ppa ${tmpdir}/qgroundcontrol_${version}_source.changes