Skip to content

Commit

Permalink
[build] Added "flavour[arch] is defined" check
Browse files Browse the repository at this point in the history
Avoid failures if flavour[arch] is not defined.
  • Loading branch information
nemesifier committed Jan 24, 2017
1 parent 1ad05ef commit 8587903
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions templates/build/build-images.sh.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ START_TIME=$(date +"%Y-%m-%d-%H%M%S")
latest_link="$BINDIR/$org/latest"
cd $BASEDIR/$arch
{% for flavour_string in org.flavours %}
{% set flavour = openwisp2fw_image_flavours[flavour_string] %}

{# build image for arch/org/flavour #}
{% set flavour = openwisp2fw_image_flavours[flavour_string] %}
{% if flavour[arch] is defined %}

flavour="{{ flavour_string }}"
profile="{{ flavour[arch].profile }}"
Expand All @@ -37,6 +37,7 @@ START_TIME=$(date +"%Y-%m-%d-%H%M%S")
rm -rf $bin_dir
exit 1
fi
{% endif %}
{% endfor %}

{# link (each org) to latest compilation for convenience #}
Expand Down

0 comments on commit 8587903

Please sign in to comment.