Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 18 additions & 5 deletions package/build_boards_manager_package.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/bin/bash
#

#set -x

ver=`git describe --tag`
visiblever=$ver
if [ "$ver" = 0.0.1 ]; then
# match 0.0.*
if [ "${ver%.*}" = 0.0 ]; then

git tag -d 0.0.1
git tag -d ${ver}
ver=`git describe --tag HEAD`
plain_ver=$ver

Expand Down Expand Up @@ -167,8 +167,21 @@ curl -L -o $old_json "https://github.com/esp8266/Arduino/releases/download/${bas
new_json=package_esp8266com_index.json

set +e
# Merge the old and new, then drop any obsolete package versions
python3 ../../merge_packages.py $new_json $old_json | python3 ../../drop_versions.py - tools 1.20.0-26-gb404fb9 >tmp && mv tmp $new_json && rm $old_json
# Merge the old and new
python3 ../../merge_packages.py $new_json $old_json > tmp

# additional json to merge (for experimental releases)
echo "Additional json package files: ${MOREJSONPACKAGES}"
for json in ${MOREJSONPACKAGES}; do
if [ ! -z "$json" -a -r "$json" ]; then
echo "- merging $json"
python3 ../../merge_packages.py tmp $json > tmp2
mv tmp2 tmp
fi
done

# drop any obsolete package versions
python3 ../../drop_versions.py - tools 1.20.0-26-gb404fb9 < tmp > tmp2 && mv tmp2 $new_json && rm $old_json tmp

# Verify the JSON file can be read, fail if it's not OK
set -e
Expand Down