aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Shawcroft <scott@tannewt.org>2017-08-23 12:22:08 -0700
committerGitHub <noreply@github.com>2017-08-23 12:22:08 -0700
commit774bf0cf0a93083dcaf6f9b2ff01c521cfdee5fd (patch)
treed449ee3d657ef1b152de89353be6d0dd8c839971 /tools
parent74cfdeb316420a3732370a5e19a6822c52395384 (diff)
tools: Always upload to Rosie from Travis. (#200)
This allows Rosie to automatically work for commits to forks.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/build_adafruit_bins.sh15
1 files changed, 10 insertions, 5 deletions
diff --git a/tools/build_adafruit_bins.sh b/tools/build_adafruit_bins.sh
index 29747fde9..462ec9711 100755
--- a/tools/build_adafruit_bins.sh
+++ b/tools/build_adafruit_bins.sh
@@ -18,8 +18,13 @@ if [ $? -ne 0 ]; then
version=`date +%Y%m%d`-`git rev-parse --short HEAD`
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
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
(( exit_status = exit_status || $? ))
# 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
- echo "Uploading to https://$rosie.ngrok.io/upload/$TRAVIS_PULL_REQUEST_SHA"
- curl -F "file=@bin/$board/adafruit-circuitpython-$board-$version.uf2" 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/$sha
done
fi
done