support for build artifact upload to a remote server

This commit is contained in:
Paul Rogalinski 2015-03-31 18:49:07 +02:00
parent 8a9d2e3708
commit af7097688f
2 changed files with 32 additions and 1 deletions

View File

@ -3,5 +3,26 @@
if [ $RUNTESTS ] ; then
cd ./src/test && make test
else
make -j2
if [ $PUBLISH_URL ] ; then
make -j2
TARGET_FILE=obj/cleanflight_${TARGET}
if [ -f ${TARGET_FILE}.bin ];
then
TARGET_FILE=${TARGET_FILE}.bin
elif [ -f ${TARGET_FILE}.hex ];
then
TARGET_FILE=${TARGET_FILE}.hex
else
echo "build artifact (hex or bin) for ${TARGET_FILE} not found, aborting";
exit 1
fi
curl -F file=@${TARGET_FILE} ${PUBLISH_URL}
else
make -j2
fi
fi

View File

@ -0,0 +1,10 @@
#Travis
Cleanflight provides Travis build and config files in the repository root.
## Pushing builds to a remote server
```.travis.sh``` script can upload build artifacts to a remote server. This feature is controlled by the
```PUBLISH_URL``` environment variable. If set, the build script will use the cURL binary and simulate
a file upload post to the configured server.