mirror of
https://github.com/xoseperez/espurna.git
synced 2026-03-06 16:27:12 +01:00
Use correct arguments for stat on macOS
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user