Skip to content

Commit

Permalink
chore: add editorconfig file and fix some formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vdovhanych committed Aug 22, 2024
1 parent 205e487 commit ea2bb49
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 6 deletions.
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true
[*]
indent_style = space
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
max_line_length = off
[Makefile]
indent_style = tab
2 changes: 1 addition & 1 deletion check_releases.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def check_firmware(model, bitcoin_only=False):

else:
print("OK")

if model == "t2b1":
vendorlen = struct.unpack("<I", data[4:8])[0]
headerlen = struct.unpack("<I", data[4 + vendorlen : 8 + vendorlen])[0]
Expand Down
2 changes: 1 addition & 1 deletion scripts/check-all-firmware-revisions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# This is basically copy-paste of
# This is basically copy-paste of
# https://github.com/trezor/trezor-suite/blob/develop/packages/connect-common/scripts/check-all-firmware-revisions.sh
#
# Small adjustments are made because here we check releases.json here in data/firmware, not those in trezor-suite/connect-common.
Expand Down
8 changes: 4 additions & 4 deletions scripts/check-firmware-revisions.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env bash

# This is basically copy-paste of
# This is basically copy-paste of
# https://github.com/trezor/trezor-suite/blob/develop/packages/connect-common/scripts/check-firmware-revisions.sh
#
# Small adjustments are made because here we check releases.json here in data/firmware, not those in trezor-suite/connect-common.
Expand Down Expand Up @@ -52,14 +52,14 @@ git reset "origin/$BRANCH" --hard
DATA=$(jq -r '.[] | .version |= join(".") | .firmware_revision + "%" + .version' < "$RELEASES_FOLDER/$DEVICE"/releases.json)

for ROW in $DATA;
do
do
FW_REVISION=$(echo "$ROW" | cut -d"%" -f1)
EXPECTED_TAG=$([[ "$DEVICE" == "t1b1" || "$DEVICE" == "1" ]] && echo "legacy" || echo "core")/v$(echo "$ROW" | cut -d"%" -f2)

RESULT_TAGS=$(git tag --points-at "$FW_REVISION")

for RESULT_TAG in $RESULT_TAGS;
do
do
if [[ "$RESULT_TAG" == "$EXPECTED_TAG" ]]; then
echo "[$DEVICE] Version $EXPECTED_TAG ... OK"
continue 2
Expand Down

0 comments on commit ea2bb49

Please sign in to comment.