File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,11 +13,18 @@ cd "$PARENT_PATH/../firmware" || exit
1313
1414EXCLUDED_DIR=" translations"
1515
16+ IS_LEGACY=" false"
17+
1618for dir in * / ; do
1719 DEVICE=${dir%/ }
18- if [[ $EXCLUDED_DIR == " $DEVICE " ]]; then continue ; fi
20+ # TODO: we excude t3w1 until we have releases on it.
21+ if [[ $EXCLUDED_DIR == " $DEVICE " || $DEVICE == " t3w1" ]]; then continue ; fi
22+ is_legacy_for_device=" $IS_LEGACY "
23+ if [[ " $DEVICE " == " 1" || " $DEVICE " == " 2" ]]; then
24+ is_legacy_for_device=" true"
25+ fi
1926 if [ -d " $dir " ]; then
20- if ! " $PARENT_PATH /check-firmware-revisions.sh" " $DEVICE " ; then
27+ if ! " $PARENT_PATH /check-firmware-revisions.sh" " $DEVICE " " $is_legacy_for_device " ; then
2128 exit 1
2229 fi ;
2330 fi
Original file line number Diff line number Diff line change 99
1010PARENT_PATH=$( cd " $( dirname " ${BASH_SOURCE[0]} " ) " || exit ; pwd -P )
1111
12- if [[ $# -ne 1 ]]
12+ if [[ $# -ne 2 ]]
1313 then
14- echo " must provide 1 argument. $# provided"
14+ echo " must provide 2 argument. $# provided"
1515 exit 1
1616fi
1717
1818DEVICE=$1
19+ IS_LEGACY=$2
1920
2021RELEASES_FOLDER=" $PARENT_PATH " /../firmware
2122
@@ -49,7 +50,19 @@ git fetch origin
4950git checkout " $BRANCH "
5051git reset " origin/$BRANCH " --hard
5152
52- DATA=$( jq -r ' .[] | .version |= join(".") | .firmware_revision + "%" + .version' < " $RELEASES_FOLDER /$DEVICE " /releases.json)
53+
54+ DATA=" "
55+
56+ # When checking legacy "1" and "2" directories we do not check `bitcoinonly` and `universal` directories
57+ # with new format, we only check it for legacy `releases.json`. For the rest we check it for both formats.
58+ if [[ " $IS_LEGACY " == " true" ]]; then
59+ DATA=$( jq -r ' .[] | .version |= join(".") | .firmware_revision + "%" + .version' < " $RELEASES_FOLDER /$DEVICE " /releases.json)
60+ else
61+ DATA=$(
62+ jq -r ' .[] | .version |= join(".") | .firmware_revision + "%" + .version' < " $RELEASES_FOLDER /$DEVICE " /releases.json
63+ jq -r ' .version |= join(".") | .firmware_revision + "%" + .version' " $RELEASES_FOLDER /$DEVICE " /{bitcoinonly,universal}/* .json
64+ )
65+ fi
5366
5467for ROW in $DATA ;
5568do
You can’t perform that action at this time.
0 commit comments