Browse Source

Option to specify destination folder for images generated by build.sh script

ech1560
Xose Pérez 6 years ago
parent
commit
34c195b4c0
1 changed files with 7 additions and 2 deletions
  1. +7
    -2
      code/build.sh

+ 7
- 2
code/build.sh View File

@ -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


Loading…
Cancel
Save