From 3d7a2077ca60b54111d8951ba4cc35f149db72c4 Mon Sep 17 00:00:00 2001 From: Christopher Mullins Date: Mon, 27 May 2019 11:40:44 -0700 Subject: [PATCH] Make travis CI artifact uploading robust to PIO 4.0 directory structure --- .gitignore | 1 + .prepare_release | 10 ++++++++-- .travis.yml | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index b0197bde..9ee135b1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .pioenvs .piolibdeps +.pio .clang_complete .gcc-flags.json .sconsign.dblite diff --git a/.prepare_release b/.prepare_release index 855f8de9..83122e31 100755 --- a/.prepare_release +++ b/.prepare_release @@ -6,7 +6,7 @@ prepare_log() { echo "[prepare release] -- $@" } -if ! git describe --exact-match HEAD 2>/dev/null; then +if [ -z "$(git tag -l --points-at HEAD)" ]; then prepare_log "Skipping non-tagged commit." exit 0 fi @@ -17,7 +17,13 @@ prepare_log "Preparing release for tagged version: $VERSION" mkdir -p dist -for file in $(ls .pioenvs/**/firmware.bin); do +if [ -d .pio/build ]; then + firmware_prefix=".pio/build" +else + firmware_prefix=".pioenvs" +fi + +for file in $(ls ${firmware_prefix}/**/firmware.bin); do env_dir=$(dirname "$file") env=$(basename "$env_dir") diff --git a/.travis.yml b/.travis.yml index 0a94585b..5e2b0698 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ env: before_install: - nvm install $NODE_VERSION install: -- pip install -U https://github.com/platformio/platformio-core/archive/develop.zip +- pip install -U platformio - platformio lib install - cd web && npm install && cd .. script: