9 changed files with 31 additions and 65 deletions
@ -1,28 +1,17 @@
@@ -1,28 +1,17 @@
|
||||
#! /bin/bash |
||||
|
||||
tmpdir=`mktemp -d` |
||||
long_version=`git describe --always --tags` |
||||
short_version=`git describe --always --tags | cut -d "-" -f 1,2` |
||||
version="2.4" |
||||
rsync -av --delete --exclude=.git ~/git/qgroundcontrol/ ~/tmp/qgroundcontrol-${version}/ |
||||
|
||||
version=${long_version:1} |
||||
dir_version=${short_version:1} |
||||
echo $version |
||||
cd ~/tmp |
||||
tar pczf qgroundcontrol_${version}.orig.tar.gz qgroundcontrol-${version} |
||||
|
||||
debchange -v ${version} --distribution trusty |
||||
|
||||
qmake -r qgroundcontrol.pro |
||||
make git_ver |
||||
|
||||
rsync -av --delete --exclude={.git,build-release,release,Makefile\*} . ${tmpdir}/qgroundcontrol-${dir_version}/ |
||||
|
||||
cd ${tmpdir} |
||||
tar pczf qgroundcontrol_${dir_version}.orig.tar.gz qgroundcontrol-${dir_version} |
||||
|
||||
cd ${tmpdir}/qgroundcontrol-${dir_version}/ |
||||
cd ~/tmp/qgroundcontrol-${version}/ |
||||
debuild -S |
||||
|
||||
dput ppa:qgroundcontrol/ppa ${tmpdir}/qgroundcontrol_${version}_source.changes |
||||
dput ppa:qgroundcontrol/ppa qgroundcontrol_${version}-0ubuntu1_source.changes |
||||
|
||||
|
||||
|
||||
# test building the source deb locally |
||||
#debuild --prepend-path=/usr/lib/ccache -sa |
||||
debuild --prepend-path=/usr/lib/ccache -sa |
||||
|
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
# set the QGC version from git |
||||
|
||||
exists ($$PWD/.git) { |
||||
GIT_DESCRIBE = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags) |
||||
WindowsBuild { |
||||
QGC_GIT_VER = echo extern \"C\" { const char *git_version() { return \"$$GIT_DESCRIBE\"; } } > git_version.cpp |
||||
LIBS += git_version.obj |
||||
} else { |
||||
QGC_GIT_VER = echo \"extern \\\"C\\\" { const char *git_version() { return \\\"$$GIT_DESCRIBE\\\"; } }\" > git_version.cpp |
||||
LIBS += git_version.o |
||||
} |
||||
} |
||||
|
||||
WindowsBuild { |
||||
LIBS += git_version.obj |
||||
} else { |
||||
LIBS += git_version.o |
||||
} |
||||
|
||||
CONFIG(debug) { |
||||
GIT_VERSION_CXXFLAGS = $$QMAKE_CXXFLAGS_DEBUG |
||||
} else { |
||||
GIT_VERSION_CXXFLAGS = $$QMAKE_CXXFLAGS_RELEASE |
||||
} |
||||
|
||||
QMAKE_PRE_LINK += $$QGC_GIT_VER && $$QMAKE_CXX -c $$GIT_VERSION_CXXFLAGS git_version.cpp |
Loading…
Reference in new issue