tools: Always upload to Rosie from Travis. (#200)
This allows Rosie to automatically work for commits to forks.
This commit is contained in:
parent
74cfdeb316
commit
774bf0cf0a
|
@ -6,7 +6,7 @@ binaries:
|
||||||
bucket: adafruit-circuit-python
|
bucket: adafruit-circuit-python
|
||||||
file_pattern: bin/{board}/adafruit-circuitpython-{board}-*-{short_sha}.{extension}
|
file_pattern: bin/{board}/adafruit-circuitpython-{board}-*-{short_sha}.{extension}
|
||||||
rosie_upload:
|
rosie_upload:
|
||||||
file_pattern: adafruit-circuitpython-{board}-{short_sha}.{extension}
|
file_pattern: adafruit-circuitpython-{board}*{short_sha}.{extension}
|
||||||
|
|
||||||
circuitpython_tests:
|
circuitpython_tests:
|
||||||
test_directories:
|
test_directories:
|
||||||
|
|
|
@ -18,8 +18,13 @@ if [ $? -ne 0 ]; then
|
||||||
version=`date +%Y%m%d`-`git rev-parse --short HEAD`
|
version=`date +%Y%m%d`-`git rev-parse --short HEAD`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
|
||||||
version=`echo $TRAVIS_PULL_REQUEST_SHA | cut -c1-7`
|
if [ "$TRAVIS" == "true" ]; then
|
||||||
|
sha=$TRAVIS_COMMIT
|
||||||
|
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
version=`date +%Y%m%d`-`echo $TRAVIS_PULL_REQUEST_SHA | cut -c1-7`
|
||||||
|
sha=$TRAVIS_PULL_REQUEST_SHA
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for board in $ATMEL_BOARDS; do
|
for board in $ATMEL_BOARDS; do
|
||||||
|
@ -29,10 +34,10 @@ for board in $ATMEL_BOARDS; do
|
||||||
cp atmel-samd/build-$board/firmware.uf2 bin/$board/adafruit-circuitpython-$board-$version.uf2
|
cp atmel-samd/build-$board/firmware.uf2 bin/$board/adafruit-circuitpython-$board-$version.uf2
|
||||||
(( exit_status = exit_status || $? ))
|
(( exit_status = exit_status || $? ))
|
||||||
# Only upload to Rosie if its a pull request.
|
# Only upload to Rosie if its a pull request.
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
if [ "$TRAVIS" == "true" ]; then
|
||||||
for rosie in $ROSIE_SETUPS; do
|
for rosie in $ROSIE_SETUPS; do
|
||||||
echo "Uploading to https://$rosie.ngrok.io/upload/$TRAVIS_PULL_REQUEST_SHA"
|
echo "Uploading to https://$rosie.ngrok.io/upload/$sha"
|
||||||
curl -F "file=@bin/$board/adafruit-circuitpython-$board-$version.uf2" https://$rosie.ngrok.io/upload/$TRAVIS_PULL_REQUEST_SHA
|
curl -F "file=@bin/$board/adafruit-circuitpython-$board-$version.uf2" https://$rosie.ngrok.io/upload/$sha
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue