Skip to content

Commit bc4f000

Browse files
authored
package builder: updates for alpha releases (#7088)
allow versions 0.0.* to be special
1 parent 321d256 commit bc4f000

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

package/build_boards_manager_package.sh

+18-5
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/bin/bash
2-
#
32

43
#set -x
54

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

10-
git tag -d 0.0.1
10+
git tag -d ${ver}
1111
ver=`git describe --tag HEAD`
1212
plain_ver=$ver
1313

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

169169
set +e
170-
# Merge the old and new, then drop any obsolete package versions
171-
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
170+
# Merge the old and new
171+
python3 ../../merge_packages.py $new_json $old_json > tmp
172+
173+
# additional json to merge (for experimental releases)
174+
echo "Additional json package files: ${MOREJSONPACKAGES}"
175+
for json in ${MOREJSONPACKAGES}; do
176+
if [ ! -z "$json" -a -r "$json" ]; then
177+
echo "- merging $json"
178+
python3 ../../merge_packages.py tmp $json > tmp2
179+
mv tmp2 tmp
180+
fi
181+
done
182+
183+
# drop any obsolete package versions
184+
python3 ../../drop_versions.py - tools 1.20.0-26-gb404fb9 < tmp > tmp2 && mv tmp2 $new_json && rm $old_json tmp
172185

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

0 commit comments

Comments
 (0)