7 workdir
=/home
/opentx
/release22
8 output
=/var
/www
/html
/2.2
13 # Create on-demand build environment
14 cp code
/radio
/util
/Dockerfile .
15 docker build
-t new-
${docker} .
16 docker rmi
-f ${docker} || true
17 docker tag new-
${docker} ${docker}
18 docker rmi
-f new-
${docker}
20 # Call sdcard generation
21 code
/tools
/release22
/build-sdcard.sh
23 # Build Linux companion
24 docker run
-dit --name companion
-v /home
/opentx
/${docker}:/opentx
${docker}
25 docker
exec companion sh
-c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt"
26 docker
exec companion
rm -rf build
27 if [ ! -f ${output}/companion/linux/companion22_${version}${suffix}_amd64.deb
]; then
28 docker
exec companion
/opentx
/code
/tools
/build-companion.sh
/opentx
/code
/opentx
/binaries
/
29 cp -f binaries
/*.deb
${output}/companion
/linux
/companion22_
${version}_amd64.deb
30 cp -f binaries
/radio
/src
/lua
/lua_fields_
*.txt
${output}/firmware
35 # Request companion compilation on Windows
36 if [ ! -f ${output}/companion/windows/companion-windows-${version}${suffix}.exe
]; then
37 cd ${output}/companion
/windows
38 wget
-qO- http
://winbox.open-tx.org
/companion-builds
/compile22.php?branch
=$branch
39 wget
-O companion-windows-
${version}.exe http
://winbox.open-tx.org
/companion-builds
/companion-windows-
${version}.exe
40 chmod -f g
+w companion-windows-$
{version.exe
43 # Request companion compilation on Mac OS X
44 if [ ! -f ${output}/companion/macosx/opentx-companion-${version}${suffix}.dmg
]; then
45 cd ${output}/companion
/macosx
46 wget
-qO- http
://opentx.blinkt.de
:8080/~opentx
/build-opentx.py?branch
=${branch}
47 wget
-O opentx-companion-
${version}.dmg http
://opentx.blinkt.de
:8080/~opentx
/builds
/opentx-companion-
${version}.dmg
48 chmod -f g
+w opentx-companion-
${version}.dmg
52 cp -f $workdir/binaries
/stamp-opentx.txt
${output}/firmware
53 rm -f ${output}/companion
/windows
/companion-windows.stamp
54 echo "#define VERSION "'"2.2.0"' >> ${output}/companion
/windows
/companion-windows.stamp
55 cp -f ${output}/companion
/windows
/companion-windows.stamp
${output}/companion
/linux
/companion-windows.stamp
56 cp -f ${output}/companion
/windows
/companion-windows.stamp
${output}/companion
/linux
/companion-macosx.stamp
58 # Clean binaries It will be hosting built on demand firmware
59 rm -rf $workdir/binaries
/*
60 rm -rf $workdir/binaries
/.lock