1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-14 03:49:52 +03:00
opentx/jenkins/nightly-21/release-firmware.sh
2016-01-04 22:34:23 +01:00

46 lines
1 KiB
Bash
Executable file

#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd ${DIR}
# pull the latest changes
./update-repo.sh
# retrieve release after the repo update
source ./version.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
DESTDIR=/var/www/html/downloads-${version}/nightly/firmware
# copy the stamp and the release-notes to the http server
cd ${DIR}
cp opentx/radio/src/stamp-opentx.txt ${DESTDIR}
cp opentx/radio/releasenotes.txt ${DESTDIR}
cp opentx/radio/src/lua_fields_*.txt ${DESTDIR}
echo ${OPENTX_VERSION_SUFFIX} > ${DESTDIR}/suffix.txt
# erase all previous builds
rm -f ${DESTDIR}/binaries/opentx*.hex
rm -f ${DESTDIR}/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean