Fix doc path
[opentx.git] / jenkins / release-20 / release-companion.sh
blobaa78822dc75c923170ae8b09ac09761ff2890251
1 #!/bin/bash
3 # stops on first error
4 set -e
6 # make sure we are in the good directory
7 cd ~opentx/release-20/
9 # pull the latest changes
10 ./update-repo.sh
12 # retrieve the version number
13 cd opentx/radio/src
14 line=`grep "VERSION = " Makefile`
15 version=`expr "$line" : 'VERSION = \([0-9]\..*\)'`
17 # create companion rpm
18 rm -rf ~opentx/release-20/companion-build/
19 mkdir -p $_
20 cd $_
21 cmake ../opentx/companion/src
22 make package
24 cp ./companion-$version-i686.rpm /var/www/html/downloads-20/companion/
25 make stamp
26 chmod -Rf g+w . || true
28 # request companion compilation on Windows
29 cd /var/www/html/downloads-20/companion/
30 wget -qO- http://winbox.open-tx.org/companion-builds/compile20.php?branch=2.0
31 wget -O companionInstall_$version.exe http://winbox.open-tx.org/companion-builds/companionInstall_$version.exe
32 mv ~opentx/release-20/opentx/companion/companion.stamp ./companion-windows.stamp
34 chmod -Rf g+w . || true