Skip to content

Commit 625c3a6

Browse files
Fail if generated JSON file cannot be read (#6076)
To avoid issues as seen in 2.5.1 release where an invalid JSON was published for a few hours, fail the board script if JQ can't parse the generated output file.
1 parent 9b8d4cc commit 625c3a6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

package/build_boards_manager_package.sh

+4
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,10 @@ set +e
158158
# Merge the old and new, then drop any obsolete package versions
159159
python ../../merge_packages.py $new_json $old_json | python ../../drop_versions.py - platforms 1.6.5-947-g39819f0 2.5.0-beta1 2.5.0-beta2 2.5.0-beta3 2.4.0-rc1 2.4.0-rc2 >tmp && mv tmp $new_json && rm $old_json
160160

161+
# Verify the JSON file can be read, fail if it's not OK
162+
set -e
163+
cat $new_json | jq empty
164+
161165
popd
162166
popd
163167

0 commit comments

Comments
 (0)