Skip to content

Commit

Permalink
automate libraries deployment for arduino IDE (1technophile#488)
Browse files Browse the repository at this point in the history
make the use of arduino IDE easier by automating the libraries deposit into github releases
  • Loading branch information
1technophile authored Nov 8, 2019
1 parent 12bd11b commit c0204de
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
10 changes: 2 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,9 @@ matrix:
- platformio update
- rm /home/travis/build/1technophile/OpenMQTTGateway/main/User_config.h
- cp /home/travis/build/1technophile/OpenMQTTGateway/test/Test_config.h /home/travis/build/1technophile/OpenMQTTGateway/main//User_config.h
script:
script:
- platformio run
- rename -v 's:/:-:g' .pio/build/*/*.bin
- mkdir toDeploy
- rename 's/.pio-build-//' .*.bin
- mv *.bin toDeploy
- cd toDeploy
- ls -la
- cd ..
- bash scripts/prepare_deploy.sh
before_deploy: ls -a
deploy:
on:
Expand Down
14 changes: 14 additions & 0 deletions scripts/prepare_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
echo "renaming bin files with the board name"
rename -v 's:/:-:g' .pio/build/*/*.bin
mkdir toDeploy
rename 's/.pio-build-//' .*.bin
cd .pio/libdeps
echo "zipping libraries per board"
for i in */; do zip -r "${i%/}-libraries.zip" "$i"; done
ls -la
mv *.zip ../../toDeploy
cd ../..
mv *.bin toDeploy
cd toDeploy
ls -la
cd ..

0 comments on commit c0204de

Please sign in to comment.