|
@ -10,6 +10,8 @@ is_git() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# Script settings |
|
|
# Script settings |
|
|
|
|
|
|
|
|
|
|
|
destination=../firmware |
|
|
version=$(grep APP_VERSION espurna/config/version.h | awk '{print $3}' | sed 's/"//g') |
|
|
version=$(grep APP_VERSION espurna/config/version.h | awk '{print $3}' | sed 's/"//g') |
|
|
|
|
|
|
|
|
if is_git; then |
|
|
if is_git; then |
|
@ -104,13 +106,13 @@ build_environments() { |
|
|
platformio run --silent --environment $environment || exit 1 |
|
|
platformio run --silent --environment $environment || exit 1 |
|
|
stat -c %s .pioenvs/$environment/firmware.bin |
|
|
stat -c %s .pioenvs/$environment/firmware.bin |
|
|
[[ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]] || \ |
|
|
[[ "${TRAVIS_BUILD_STAGE_NAME}" = "Test" ]] || \ |
|
|
mv .pioenvs/$environment/firmware.bin ../firmware/espurna-$version/espurna-$version-$environment.bin |
|
|
|
|
|
|
|
|
mv .pioenvs/$environment/firmware.bin $destination/espurna-$version/espurna-$version-$environment.bin |
|
|
done |
|
|
done |
|
|
echo "--------------------------------------------------------------" |
|
|
echo "--------------------------------------------------------------" |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
# Parameters |
|
|
# Parameters |
|
|
while getopts "lp" opt; do |
|
|
|
|
|
|
|
|
while getopts "lpd:" opt; do |
|
|
case $opt in |
|
|
case $opt in |
|
|
l) |
|
|
l) |
|
|
print_available |
|
|
print_available |
|
@ -119,6 +121,9 @@ while getopts "lp" opt; do |
|
|
p) |
|
|
p) |
|
|
par_build=true |
|
|
par_build=true |
|
|
;; |
|
|
;; |
|
|
|
|
|
d) |
|
|
|
|
|
destination=$OPTARG |
|
|
|
|
|
;; |
|
|
esac |
|
|
esac |
|
|
done |
|
|
done |
|
|
|
|
|
|
|
|