1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Clean tools key of obsolete version on next release (#6258)

Fixes #6068

Drop from the tools key all version:"1.20.0-26-gb404fb9" entries (which
were pre-2.0.0 and whose entry in platform versions was deleted on last
release).
This commit is contained in:
Earle F. Philhower, III 2019-07-15 20:45:29 -07:00 committed by GitHub
parent 3cc64f7877
commit 29bedfa842
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -156,7 +156,7 @@ 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, then drop any obsolete package versions
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 python ../../merge_packages.py $new_json $old_json | python ../../drop_versions.py - tools 1.20.0-26-gb404fb9 >tmp && mv tmp $new_json && rm $old_json
# 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

View File

@ -4,12 +4,13 @@
from __future__ import print_function from __future__ import print_function
import json import json
import sys import sys
from collections import OrderedDict
def load_package(filename): def load_package(filename):
if filename == "-": if filename == "-":
pkg = json.load(sys.stdin)['packages'][0] pkg = json.load(sys.stdin, object_pairs_hook=OrderedDict)['packages'][0]
else: else:
pkg = json.load(open(filename))['packages'][0] pkg = json.load(open(filename), object_pairs_hook=OrderedDict)['packages'][0]
print("Loaded package {0} from {1}".format(pkg['name'], filename), file=sys.stderr) print("Loaded package {0} from {1}".format(pkg['name'], filename), file=sys.stderr)
print("{0} platform(s), {1} tools".format(len(pkg['platforms']), len(pkg['tools'])), file=sys.stderr) print("{0} platform(s), {1} tools".format(len(pkg['platforms']), len(pkg['tools'])), file=sys.stderr)
return pkg return pkg