Skip to content

Commit

Permalink
Merge pull request #470 from sidoh/fix_travis_build
Browse files Browse the repository at this point in the history
Make travis CI artifact uploading robust to PIO 4.0 directory structure
  • Loading branch information
sidoh authored May 27, 2019
2 parents 114e29f + 3d7a207 commit 0f20751
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.pioenvs
.piolibdeps
.pio
.clang_complete
.gcc-flags.json
.sconsign.dblite
Expand Down
10 changes: 8 additions & 2 deletions .prepare_release
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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")

Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 0f20751

Please sign in to comment.