Compilation fix
[opentx.git] / jenkins / nightly-22 / release-companion.sh
blob1f58b583d013c2728117dd067785e49a8867f36f
1 #!/bin/bash
3 # stops on first error
4 set -e
5 set -x
7 # make sure we are in the good directory
8 DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
9 cd ${DIR}
11 # pull the latest changes
12 ./update-repo.sh
14 # retrieve release after the repo update
15 source ./version.sh
17 DESTDIR=/var/www/html/downloads-${version}/nightlies/companion
19 # clean radio source
20 cd opentx/radio/src
21 make clean
23 # create companion rpm
24 rm -rf ${DIR}/companion-build/
25 mkdir -p $_
26 cd $_
27 cmake -DPCB=TARANIS ../opentx
28 make package
29 cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}/linux
30 chmod -Rf g+w ${DESTDIR}/linux/companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm
32 # request companion compilation on Windows
33 cd ${DESTDIR}
34 wget -qO- http://winbox.open-tx.org/companion-builds/compile22.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
35 wget -O windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
36 chmod -Rf g+w windows/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
38 # update windows stamp
39 cp $DIR/companion-build/version.h ./companion-windows.stamp
40 chmod -Rf g+w ./companion-windows.stamp