diff --git a/.travis.yml b/.travis.yml index 0a28747..ee77a78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/scripts/prepare_deploy.sh b/scripts/prepare_deploy.sh new file mode 100644 index 0000000..e867143 --- /dev/null +++ b/scripts/prepare_deploy.sh @@ -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 ..