8000 Tweak the build script to always upload to Rosie from Travis by tannewt · Pull Request #200 · adafruit/circuitpython · GitHub
[go: up one dir, main page]

Skip to content

Tweak the build script to always upload to Rosie from Travis #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 23, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
tools: Always upload to Rosie from Travis.
  • Loading branch information
tannewt committed Aug 23, 2017
commit 609ea43495e8ff02ce7783055fa714374e3b44b0
15 changes: 10 additions & 5 deletions tools/build_adafruit_bins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
0