Skip to content

Commit

Permalink
package builder: updates for alpha releases (#7088)
Browse files Browse the repository at this point in the history
allow versions 0.0.* to be special
  • Loading branch information
d-a-v committed Feb 17, 2020
1 parent 321d256 commit bc4f000
Showing 1 changed file with 18 additions and 5 deletions.
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

0 comments on commit bc4f000

Please sign in to comment.