Browse Source

Merge pull request #1355 from jackwilsdon/stat-macos

Use correct arguments for stat on macOS
alexa
Xose Pérez 6 years ago
committed by GitHub
parent
commit
549616560b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions
  1. +8
    -1
      code/build.sh

+ 8
- 1
code/build.sh View File

@ -9,6 +9,13 @@ is_git() {
return 0
}
stat_bytes() {
case "$(uname -s)" in
Darwin) stat -f %z "$1";;
*) stat -c %s "$1";;
esac
}
# Script settings
destination=../firmware
@ -104,7 +111,7 @@ build_environments() {
for environment in $environments; do
echo -n "* espurna-$version-$environment.bin --- "
platformio run --silent --environment $environment || exit 1
stat -c %s .pioenvs/$environment/firmware.bin
stat_bytes .pioenvs/$environment/firmware.bin
[[ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]] || \
mv .pioenvs/$environment/firmware.bin $destination/espurna-$version/espurna-$version-$environment.bin
done


Loading…
Cancel
Save