support for build artifact upload to a remote server
This commit is contained in:
parent
19b35ea715
commit
7899d3c38e
23
.travis.sh
23
.travis.sh
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
Loading…
Reference in New Issue