1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

package builder: updates for alpha releases (#7088)

allow versions 0.0.* to be special
This commit is contained in:
david gauchard 2020-02-17 17:40:50 +01:00 committed by GitHub
parent 321d256c8b
commit bc4f000c48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,13 +1,13 @@
#!/bin/bash #!/bin/bash
#
#set -x #set -x
ver=`git describe --tag` ver=`git describe --tag`
visiblever=$ver 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` ver=`git describe --tag HEAD`
plain_ver=$ver plain_ver=$ver
@ -167,8 +167,21 @@ curl -L -o $old_json "https://github.com/esp8266/Arduino/releases/download/${bas
new_json=package_esp8266com_index.json new_json=package_esp8266com_index.json
set +e set +e
# Merge the old and new, then drop any obsolete package versions # Merge the old and new
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 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 # Verify the JSON file can be read, fail if it's not OK
set -e set -e