7 workdir
=/home
/opentx
/release22
8 output
=/var
/www
/html
/2.2/release
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}_amd64.deb
]; then
28 docker
exec companion
/opentx
/code
/tools
/build-companion-release.sh
/opentx
/code
/opentx
/binaries
/
29 docker
exec companion sh
-c "cp /build/radio/src/lua/*.txt /opentx/binaries"
30 cp -f binaries
/*.deb
${output}/companion
/linux
/companion22_
${version}_amd64.deb
31 cp -f binaries
/lua_fields_
*.txt
${output}/firmware
36 # Request companion compilation on Windows
37 if [ ! -f ${output}/companion
/windows
/companion-windows-
${version}.exe
]; then
38 cd ${output}/companion
/windows
39 wget
-qO- http
://winbox.open-tx.org
/companion-builds
/compile22.php?branch
=${branch}
40 wget
-O companion-windows-
${version}.exe http
://winbox.open-tx.org
/companion-builds
/companion-windows-
${version}.exe
41 chmod -f g
+w companion-windows-
${version}.exe
44 # Request companion compilation on Mac OS X
45 if [ ! -f ${output}/companion
/macosx
/opentx-companion-
${version}.dmg
]; then
46 cd ${output}/companion
/macosx
47 wget
-qO- http
://opentx.blinkt.de
:8080/~opentx
/build-opentx.py?branch
=${branch}
48 wget
-O opentx-companion-
${version}.dmg http
://opentx.blinkt.de
:8080/~opentx
/builds
/opentx-companion-
${version}.dmg
49 chmod -f g
+w opentx-companion-
${version}.dmg
53 cp -f $workdir/binaries
/stamp-opentx.txt
${output}/firmware
54 echo "#define VERSION "'"2.2.3"' > ${output}/companion
/companion-windows.stamp
55 cp -f ${output}/companion
/companion-windows.stamp
${output}/companion
/companion-macosx.stamp
56 cp -f ${output}/companion
/companion-windows.stamp
${output}/companion
/companion-linux.stamp
59 # Clean binaries It will be hosting built on demand firmware
60 rm -rf $workdir/binaries
/*
61 rm -rf $workdir/binaries
/.lock