Housekeeping start
This commit is contained in:
Executable
+47
@@ -0,0 +1,47 @@
|
||||
#!/usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
from __future__ import print_function
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
|
||||
if len(sys.argv) > 1:
|
||||
inputFile = sys.argv[1]
|
||||
inp = open(inputFile, "r")
|
||||
else:
|
||||
inp = sys.stdin
|
||||
|
||||
pattern = re.compile("#\d+")
|
||||
while True:
|
||||
skip = False
|
||||
line = inp.readline()
|
||||
if len(line) == 0:
|
||||
break
|
||||
line = line.strip('\r\n')
|
||||
|
||||
if len(line) == 0:
|
||||
skip = True
|
||||
if line.startswith("<"):
|
||||
skip = True
|
||||
if line.startswith("["):
|
||||
skip = True
|
||||
|
||||
if not skip:
|
||||
# line = line.strip()
|
||||
# print("line: %s" % line)
|
||||
found = re.findall(pattern, line)
|
||||
if len(found) > 0:
|
||||
for issue in found:
|
||||
line = line.replace(issue, '')
|
||||
# add issues
|
||||
issue_links = ["<a href=https://github.com/opentx/opentx/issues/%d>#%d</a>" % (int(issue[1:]), int(issue[1:])) for issue in found]
|
||||
links = "(" + ", ".join(issue_links) + ")"
|
||||
line = "<li>" + line + " " + links + "</li>"
|
||||
|
||||
print(line)
|
||||
|
||||
|
||||
inp.close()
|
||||
sys.exit(0)
|
||||
@@ -1,79 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
branch=2.3.0
|
||||
docker=nightly23
|
||||
workdir=/home/opentx/nightly23
|
||||
output=/var/www/html/2.3/nightlies
|
||||
version=2.3.0
|
||||
|
||||
echo "Increment nightly index"
|
||||
index=`cat index.txt`
|
||||
index=`expr $index + 1`
|
||||
suffix="N$index"
|
||||
|
||||
cd ${workdir}
|
||||
|
||||
echo "Create on-demand build environment"
|
||||
cp code/radio/util/Dockerfile .
|
||||
docker build -t new-${docker} --build-arg OPENTX_VERSION_SUFFIX=${suffix} .
|
||||
docker rmi -f ${docker} || true
|
||||
docker tag new-${docker} ${docker}
|
||||
docker rmi -f new-${docker}
|
||||
|
||||
echo "Call sdcard generation"
|
||||
code/tools/nightly23/build-sdcard.sh
|
||||
|
||||
echo "Delete companion container in case of previous failed atempt"
|
||||
if [ "$(docker ps -aq -f name=companion)" ]; then
|
||||
docker rm --force companion
|
||||
fi
|
||||
|
||||
echo "Build firmware stamps"
|
||||
docker run -dit --name companion -v /home/opentx/${docker}:/opentx ${docker}
|
||||
docker exec companion sh -c "mkdir -p build && cd build && cmake /opentx/code && cp radio/src/stamp.h /opentx/binaries/stamp-opentx.txt"
|
||||
cp -f ${workdir}/binaries/stamp-opentx.txt ${output}/firmware
|
||||
# These radios are currently not enabled
|
||||
# echo "#define BLOCK \"x10,x12s\"" >> ${output}/firmware/stamp-opentx.txt
|
||||
echo "#define ERROR \"MOVE_TO_RELEASE\"" >> ${output}/firmware/stamp-opentx.txt
|
||||
docker exec companion rm -rf build
|
||||
|
||||
echo "Check if Linux companion is needed"
|
||||
if [ ! -f ${output}/companion/linux/companion23_${version}${suffix}_amd64.deb ]; then
|
||||
echo "Build Linux companion"
|
||||
docker exec companion /opentx/code/tools/build-companion-nightly.sh /opentx/code /opentx/binaries/ ${suffix}
|
||||
cp -f binaries/*.deb ${output}/companion/linux/companion23_${version}${suffix}_amd64.deb
|
||||
fi
|
||||
docker stop companion
|
||||
docker rm companion
|
||||
|
||||
echo "Check if Windows companion is needed"
|
||||
if [ ! -f ${output}/companion/windows/companion-windows-${version}${suffix}.exe ]; then
|
||||
echo "Build Windows companion"
|
||||
cd ${output}/companion/windows
|
||||
wget --tries=1 --read-timeout=6000 -O- http://winbox.open-tx.org/companion-builds/compile23.php?branch=$branch\&suffix=${suffix}
|
||||
wget -O companion-windows-${version}${suffix}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${version}${suffix}.exe
|
||||
chmod -Rf g+w companion-windows-${version}${suffix}.exe
|
||||
fi
|
||||
|
||||
echo "Check if Macosc companion is needed"
|
||||
if [ ! -f ${output}/companion/macosx/opentx-companion-${version}${suffix}.dmg ]; then
|
||||
echo "Build Macosx companion"
|
||||
cd ${output}/companion/macosx
|
||||
wget --tries=1 -qO- http://opentx.blinkt.de:8080/~opentx/build-opentx.py?branch=${branch}\&suffix=${suffix}
|
||||
wget -O opentx-companion-${version}${suffix}.dmg http://opentx.blinkt.de:8080/~opentx/builds/opentx-companion-${version}${suffix}.dmg
|
||||
chmod -Rf g+w opentx-companion-${version}${suffix}.dmg
|
||||
fi
|
||||
|
||||
echo "Update Companion stamps"
|
||||
echo "#define VERSION \"${version}${suffix}\"" > ${output}/companion/companion-windows.stamp
|
||||
cp -f ${output}/companion/companion-windows.stamp ${output}/companion/companion-linux.stamp
|
||||
cp -f ${output}/companion/companion-windows.stamp ${output}/companion/companion-macosx.stamp
|
||||
|
||||
echo "Clean binaries It will be hosting built on demand firmware"
|
||||
rm -rf ${workdir}/binaries/*
|
||||
rm -rf ${workdir}/binaries/.lock
|
||||
|
||||
echo "Release $index successfully completed"
|
||||
echo $index > ${workdir}/index.txt
|
||||
@@ -1,77 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
workdir=/home/opentx/nightly23
|
||||
output=/var/www/html/2.3/nightlies
|
||||
|
||||
# Handle opentx.sdcard.version
|
||||
sdcard_version="2.3V"$(grep 'set(SDCARD_REVISION' ${workdir}/code/CMakeLists.txt | grep -o '".*"' | sed 's/"//g')
|
||||
echo ${sdcard_version} > ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version
|
||||
echo ${sdcard_version} > ${workdir}/code/radio/sdcard/taranis-x9/opentx.sdcard.version
|
||||
echo ${sdcard_version} > ${workdir}/code/radio/sdcard/taranis-x7/opentx.sdcard.version
|
||||
|
||||
if cmp --silent ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version ${workdir}/opentx.sdcard.version
|
||||
then
|
||||
exit
|
||||
else
|
||||
cd ${workdir}
|
||||
|
||||
# Copy git sdcard data
|
||||
rm -Rf ${workdir}/sdcard
|
||||
cp -r ${workdir}/code/radio/sdcard .
|
||||
|
||||
# Get images for Horus
|
||||
mkdir -p ${workdir}/sdcard/horus/IMAGES
|
||||
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
|
||||
|
||||
|
||||
# Request sound pack generation
|
||||
if [[ ! -d /tmp/SOUNDS/fr ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py en csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/es ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py fr csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/it ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py es csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/de ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py it csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/cz ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py de csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/pl ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py cz csv files
|
||||
fi
|
||||
if [[ ! -d /tmp/SOUNDS/ru ]];then
|
||||
${workdir}/code/tools/nightly23/tts.py pt csv files
|
||||
fi
|
||||
${workdir}/code/tools/nightly23/tts.py ru csv psv files
|
||||
|
||||
# Create sdcards.zips for supported platforms
|
||||
mv /tmp/SOUNDS ${workdir}/sdcard/horus/
|
||||
mkdir ${workdir}/sdcard/taranis-x9/SOUNDS
|
||||
mkdir ${workdir}/sdcard/taranis-x7/SOUNDS
|
||||
cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis-x9/
|
||||
cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis-x7/
|
||||
cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/sdcard-horus-${sdcard_version}.zip *
|
||||
cd ${workdir}/sdcard/taranis-x9 && zip -r ${output}/sdcard/sdcard-taranis-x9-${sdcard_version}.zip *
|
||||
cd ${workdir}/sdcard/taranis-x7 && zip -r ${output}/sdcard/sdcard-taranis-x7-${sdcard_version}.zip *
|
||||
|
||||
# Create symlinks for other radios
|
||||
ln -s ${output}/sdcard/sdcard-taranis-x7-${sdcard_version}.zip ${output}/sdcard/sdcard-taranis-xlite-${sdcard_version}.zip
|
||||
ln -s ${output}/sdcard/sdcard-taranis-x7-${sdcard_version}.zip ${output}/sdcard/sdcard-taranis-x9lite-${sdcard_version}.zip
|
||||
ln -s ${output}/sdcard/sdcard-taranis-x7-${sdcard_version}.zip ${output}/sdcard/sdcard-jumper-t12-${sdcard_version}.zip
|
||||
ln -s ${output}/sdcard/sdcard-horus-${sdcard_version}.zip ${output}/sdcard/sdcard-jumper-t16-${sdcard_version}.zip
|
||||
|
||||
# remove LUA stuff for 9x platform
|
||||
rm -Rf ${workdir}/sdcard/taranis-x7/SCRIPTS
|
||||
rm -Rf ${workdir}/sdcard/taranis-x7/FrSky-utilities
|
||||
cd ${workdir}/sdcard/taranis-x7 && zip -r ${output}/sdcard/sdcard-9xarm-${sdcard_version}.zip *
|
||||
|
||||
rm -Rf ${workdir}/sdcard
|
||||
cp -r ${workdir}/code/radio/sdcard/horus/opentx.sdcard.version ${workdir}
|
||||
fi
|
||||
@@ -1,48 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
branch=2.3
|
||||
workdir=/home/opentx/nightly23
|
||||
output=/var/www/html/2.3/nightly
|
||||
|
||||
cd ${workdir}
|
||||
|
||||
# Copy git sdcard data
|
||||
rm -Rf ${workdir}/sdcard
|
||||
cp -r ${workdir}/code/radio/sdcard .
|
||||
|
||||
# Get images for Horus
|
||||
mkdir -p ${workdir}/sdcard/horus/IMAGES
|
||||
cp /home/opentx/horus-bitmaps/* ${workdir}/sdcard/horus/IMAGES/
|
||||
|
||||
# Request sound pack generation
|
||||
wget -qO- http://winbox.open-tx.org/voice-builds/compile23.php?branch=${branch}
|
||||
|
||||
# Get sounds
|
||||
cd sdcard
|
||||
wget http://winbox.open-tx.org/voice-builds/english-irish-taranis.zip
|
||||
wget http://winbox.open-tx.org/voice-builds/english-scottish-taranis.zip
|
||||
wget http://winbox.open-tx.org/voice-builds/english-american-taranis.zip
|
||||
wget http://winbox.open-tx.org/voice-builds/english-australian-taranis.zip
|
||||
wget http://winbox.open-tx.org/voice-builds/french-taranis.zip
|
||||
|
||||
# Prepare the sdcard zip files for Horus
|
||||
unzip english-irish-taranis.zip -d ${workdir}/sdcard/horus
|
||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-irish
|
||||
unzip english-scottish-taranis.zip -d ${workdir}/sdcard/horus
|
||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-scottish
|
||||
unzip english-australian-taranis.zip -d ${workdir}/sdcard/horus
|
||||
mv ${workdir}/sdcard/horus/SOUNDS/en ${workdir}/sdcard/horus/SOUNDS/en-australian
|
||||
unzip english-american-taranis -d ${workdir}/sdcard/horus
|
||||
unzip french-taranis.zip -d ${workdir}/sdcard/horus
|
||||
wget -O ${workdir}/sdcard/horus/SOUNDS/en/english.csv http://winbox.open-tx.org/voice-builds/english-american-taranis.csv
|
||||
wget -O ${workdir}/sdcard/horus/SOUNDS/fr/french.csv http://winbox.open-tx.org/voice-builds/french-taranis.csv
|
||||
|
||||
# Duplicate for Taranis and create sdcards.zip
|
||||
mkdir ${workdir}/sdcard/taranis/SOUNDS
|
||||
cp -r ${workdir}/sdcard/horus/SOUNDS ${workdir}/sdcard/taranis/
|
||||
rm -f ${workdir}/sdcard/*.zip
|
||||
cd ${workdir}/sdcard/taranis && zip -r ${output}/sdcard/sdcard-taranis.zip *
|
||||
cd ${workdir}/sdcard/horus && zip -r ${output}/sdcard/sdcard-horus.zip *
|
||||
rm -Rf ${workdir}/sdcard
|
||||
Reference in New Issue
Block a user