Track Apple OS releases (#5)

This commit is contained in:
Nemo
2022-06-02 14:33:42 +05:30
committed by GitHub
parent 880b28e31f
commit ea0306b95a
6 changed files with 443 additions and 0 deletions

155
releases/ios.json Normal file
View File

@@ -0,0 +1,155 @@
{
"13.3.1": "2020-01-28",
"12.4.5": "2020-01-28",
"12.4.6": "2020-03-24",
"13.4": "2020-03-24",
"13.4.1": "2020-04-07",
"12.4.7": "2020-05-20",
"13.5": "2020-05-20",
"13.5.1": "2020-06-01",
"13.6": "2020-07-15",
"12.4.8": "2020-07-15",
"13.6.1": "2020-08-12",
"13.7": "2020-09-01",
"14.0": "2020-09-16",
"14.0.1": "2020-09-24",
"14.1": "2020-10-20",
"12.4.9": "2020-11-05",
"14.2": "2020-11-05",
"14.2.1": "2020-11-19",
"12.5": "2020-12-14",
"14.3": "2020-12-14",
"12.5.1": "2021-01-11",
"14.4": "2021-01-26",
"14.4.1": "2021-03-08",
"12.5.2": "2021-03-26",
"14.4.2": "2021-03-26",
"14.5": "2021-04-26",
"12.5.3": "2021-05-03",
"14.5.1": "2021-05-03",
"14.6": "2021-05-24",
"12.5.4": "2021-06-14",
"14.7": "2021-07-19",
"14.7.1": "2021-07-26",
"14.8": "2021-09-13",
"12.5.5": "2021-09-23",
"15.0.1": "2021-10-01",
"15.0.2": "2021-10-11",
"15.1": "2021-10-25",
"14.8.1": "2021-10-26",
"15.1.1": "2021-11-17",
"15.2": "2021-12-13",
"15.2.1": "2022-01-12",
"15.3": "2022-01-26",
"15.3.1": "2022-02-10",
"15.4": "2022-03-14",
"15.4.1": "2022-03-31",
"15.5": "2022-05-16",
"11.2.2": "2022-05-16",
"11.2.5": "2022-05-16",
"11.2.6": "2022-05-16",
"11.3": "2022-05-16",
"11.3.1": "2022-05-16",
"11.4": "2022-05-16",
"11.4.1": "2022-05-16",
"12.0.1": "2022-05-16",
"12.1": "2022-05-16",
"12.1.1": "2022-05-16",
"12.1.2": "2022-05-16",
"12.1.3": "2022-05-16",
"12.1.4": "2022-05-16",
"12.2": "2022-05-16",
"12.3": "2019-05-13",
"12.3.1": "2019-05-24",
"12.3.2": "2019-06-10",
"9.3.6": "2019-07-22",
"10.3.4": "2019-07-22",
"12.4": "2019-07-22",
"12.4.1": "2019-08-26",
"13.1": "2019-09-24",
"12.4.2": "2019-09-26",
"13.1.1": "2019-09-27",
"13.1.2": "2019-09-30",
"13.1.3": "2019-10-15",
"12.4.3": "2019-10-28",
"13.2": "2019-10-28",
"13.2.2": "2019-11-07",
"13.2.3": "2019-11-18",
"13.3": "2019-12-10",
"12.4.4": "2019-12-10",
"9.2.1": "2019-12-10",
"9.3": "2019-12-10",
"9.3.1": "2019-12-10",
"9.3.2": "2019-12-10",
"9.3.3": "2019-12-10",
"9.3.4": "2019-12-10",
"9.3.5": "2019-12-10",
"10.0.1": "2019-12-10",
"10.0.2": "2019-12-10",
"10.0.3": "2019-12-10",
"10.1": "2019-12-10",
"10.1.1": "2019-12-10",
"10.2": "2019-12-10",
"10.2.1": "2019-12-10",
"10.3": "2019-12-10",
"10.3.1": "2019-12-10",
"10.3.2": "2019-12-10",
"10.3.3": "2019-12-10",
"11.0.1": "2019-12-10",
"11.0.2": "2019-12-10",
"11.0.3": "2019-12-10",
"11.1": "2019-12-10",
"11.1.1": "2019-12-10",
"11.1.2": "2019-12-10",
"11.2": "2019-12-10",
"11.2.1": "2019-12-10",
"8.1.3": "2015-01-27",
"8.2": "2015-03-09",
"8.3": "2015-04-08",
"8.4": "2015-06-30",
"8.4.1": "2015-08-13",
"9.0.2": "2015-09-30",
"2.6": "2015-10-15",
"9.1": "2015-10-21",
"9.2": "2015-12-08",
"6.1.6": "2015-12-08",
"7.0.6": "2015-12-08",
"7.1": "2015-12-08",
"7.1.1": "2015-12-08",
"7.1.2": "2015-12-08",
"8.1": "2014-10-20",
"8.1.1": "2014-11-17",
"8.1.2": "2014-12-09",
"6.1": "2014-12-09",
"6.1.3": "2014-12-09",
"7.0.2": "2014-12-09",
"7.0.3": "2014-12-09",
"7.0.4": "2014-12-09",
"4.3": "2014-12-09",
"4.3.2": "2014-12-09",
"4.2.7": "2014-12-09",
"4.3.4": "2014-12-09",
"4.2.9": "2014-12-09",
"4.2.10": "2014-12-09",
"4.3.5": "2014-12-09",
"5.0.1": "2014-12-09",
"5.1": "2014-12-09",
"5.1.1": "2014-12-09",
"6.0.1": "2014-12-09",
"3.1.3": "2014-12-09",
"4.0.2": "2014-12-09",
"3.2.2": "2014-12-09",
"4.1": "2014-12-09",
"4.2": "2014-12-09",
"1.1.3": "2014-12-09",
"2.0": "2014-12-09",
"2.1": "2014-12-09",
"2.2": "2014-12-09",
"3.0": "2014-12-09",
"3.0.1": "2014-12-09",
"3.1": "2014-12-09",
"3.1.1": "2014-12-09",
"1.0.1": "2014-12-09",
"1.1.1": "2014-12-09",
"1.1.2": "2014-12-09"
}

41
releases/ipados.json Normal file
View File

@@ -0,0 +1,41 @@
{
"13.3.1": "2020-01-28",
"13.4": "2020-03-24",
"13.4.1": "2020-04-07",
"13.5": "2020-05-20",
"13.5.1": "2020-06-01",
"13.6": "2020-07-15",
"14.0": "2020-09-16",
"14.0.1": "2020-09-24",
"14.1": "2020-10-20",
"14.2": "2020-11-05",
"14.3": "2020-12-14",
"14.4": "2021-01-26",
"14.4.1": "2021-03-08",
"14.4.2": "2021-03-26",
"14.5": "2021-04-26",
"14.5.1": "2021-05-03",
"14.6": "2021-05-24",
"14.7": "2021-07-21",
"14.7.1": "2021-07-26",
"14.8": "2021-09-13",
"15.0.1": "2021-10-01",
"15.0.2": "2021-10-11",
"15.1": "2021-10-25",
"14.8.1": "2021-10-26",
"15.2": "2021-12-13",
"15.2.1": "2022-01-12",
"15.3": "2022-01-26",
"15.3.1": "2022-02-10",
"15.4": "2022-03-14",
"15.4.1": "2022-03-31",
"15.5": "2022-05-16",
"13.1": "2019-09-24",
"13.1.1": "2019-09-27",
"13.1.2": "2019-09-30",
"13.1.3": "2019-10-15",
"13.2": "2019-10-28",
"13.2.2": "2019-11-07",
"13.2.3": "2019-11-18",
"13.3": "2019-12-10"
}

86
releases/macos.json Normal file
View File

@@ -0,0 +1,86 @@
{
"10.15.3": "2020-01-28",
"10.15.4": "2020-03-24",
"10.15.5": "2020-05-26",
"10.15.6": "2020-07-15",
"10.15.7": "2020-09-24",
"11.0": "2020-11-05",
"11.0.1": "2020-11-12",
"11.1": "2020-12-14",
"11.2": "2021-02-01",
"11.2.1": "2021-02-09",
"10.14.6": "2019-07-22",
"11.2.2": "2021-02-25",
"11.2.3": "2021-03-08",
"11.3": "2021-04-26",
"11.3.1": "2021-05-03",
"11.4": "2021-05-24",
"11.5": "2021-07-21",
"11.5.1": "2021-07-26",
"11.5.2": "2021-08-11",
"11.6": "2021-09-13",
"11.6.1": "2021-10-25",
"12.0": "2021-10-25",
"12.0.1": "2021-10-25",
"11.6.2": "2021-12-13",
"12.1": "2021-12-13",
"12.2": "2022-01-26",
"11.6.3": "2022-01-26",
"12.2.1": "2022-02-10",
"11.6.4": "2022-02-14",
"12.3": "2022-03-14",
"11.6.5": "2022-03-14",
"12.3.1": "2022-03-31",
"12.4": "2022-05-16",
"11.6.6": "2022-05-16",
"10.13.2": "2019-12-10",
"10.13.3": "2022-05-16",
"10.13.4": "2022-05-16",
"10.13.5": "2022-05-16",
"10.13.6": "2022-05-16",
"10.14": "2022-05-16",
"10.14.1": "2022-05-16",
"10.14.2": "2022-05-16",
"10.14.3": "2022-05-16",
"10.14.4": "2019-03-25",
"10.14.5": "2019-05-13",
"10.15": "2019-10-07",
"10.15.1": "2019-10-29",
"10.15.2": "2019-12-10",
"10.11.3": "2019-12-10",
"10.11.4": "2019-12-10",
"10.11.5": "2019-12-10",
"10.11.6": "2019-12-10",
"10.12": "2019-12-10",
"10.12.1": "2019-12-10",
"10.12.2": "2019-12-10",
"10.12.3": "2019-12-10",
"10.12.4": "2019-12-10",
"10.12.5": "2019-12-10",
"10.12.6": "2019-12-10",
"10.13": "2019-12-10",
"10.13.1": "2019-12-10",
"10.10.3": "2015-04-08",
"10.10.4": "2015-06-30",
"10.10.5": "2015-08-13",
"10.11": "2015-09-30",
"10.11.1": "2015-10-21",
"10.11.2": "2015-12-08",
"10.9.2": "2015-12-08",
"10.9.3": "2015-12-08",
"10.9.4": "2015-12-08",
"10.9.5": "2015-12-08",
"10.10": "2014-10-16",
"10.10.1": "2014-11-17",
"10.8.3": "2014-12-09",
"10.8.4": "2014-12-09",
"10.8.5": "2014-12-09",
"10.9": "2014-12-09",
"10.9.1": "2014-12-09",
"10.7.2": "2014-12-09",
"10.7.3": "2014-12-09",
"10.7.4": "2014-12-09",
"10.8.2": "2014-12-09",
"10.7.5": "2014-12-09",
"10.6.5": "2014-12-09"
}

75
releases/watchos.json Normal file
View File

@@ -0,0 +1,75 @@
{
"6.1.2": "2020-01-28",
"5.3.5": "2020-02-18",
"6.1.3": "2020-02-18",
"6.2": "2020-03-24",
"5.3.6": "2020-03-24",
"6.2.1": "2020-04-08",
"6.2.5": "2020-05-18",
"5.3.7": "2020-05-18",
"6.2.6": "2020-06-01",
"6.2.8": "2020-07-15",
"5.3.8": "2020-07-15",
"7.0": "2020-09-16",
"7.0.1": "2020-09-24",
"7.0.2": "2020-10-12",
"7.0.3": "2020-10-19",
"5.3.9": "2020-11-05",
"6.2.9": "2020-11-05",
"7.1": "2020-11-05",
"6.3": "2020-12-14",
"7.2": "2020-12-14",
"7.3": "2021-01-26",
"7.3.1": "2021-02-15",
"7.3.2": "2021-03-08",
"7.3.3": "2021-03-26",
"7.4": "2021-04-26",
"7.4.1": "2021-05-03",
"7.5": "2021-05-24",
"7.6": "2021-07-19",
"7.6.1": "2021-07-29",
"7.6.2": "2021-09-13",
"8.0.1": "2021-10-11",
"8.1": "2021-10-25",
"8.1.1": "2021-11-18",
"8.3": "2021-12-13",
"8.4": "2022-01-26",
"8.4.1": "2022-02-01",
"8.4.2": "2022-02-10",
"8.5": "2022-03-14",
"8.5.1": "2022-03-31",
"8.6": "2022-05-16",
"4.2.2": "2022-05-16",
"4.2.3": "2022-05-16",
"4.3": "2022-05-16",
"4.3.1": "2022-05-16",
"4.3.2": "2022-05-16",
"5.0.1": "2022-05-16",
"5.1": "2022-05-16",
"5.1.1": "2022-05-16",
"5.1.2": "2022-05-16",
"5.1.3": "2022-05-16",
"5.2": "2019-03-27",
"5.2.1": "2019-05-13",
"5.3": "2019-07-22",
"5.3.1": "2019-08-26",
"5.3.2": "2019-09-26",
"6.0.1": "2019-09-30",
"6.1": "2019-10-29",
"5.3.3": "2019-10-29",
"6.1.1": "2019-12-10",
"5.3.4": "2019-12-10",
"2.2": "2019-12-10",
"2.2.1": "2019-12-10",
"2.2.2": "2019-12-10",
"3.1": "2019-12-10",
"3.1.3": "2019-12-10",
"3.2": "2019-12-10",
"3.2.2": "2019-12-10",
"3.2.3": "2019-12-10",
"4.0.1": "2019-12-10",
"4.1": "2019-12-10",
"4.2": "2019-12-10",
"2.0.1": "2015-10-21",
"2.1": "2015-12-08"
}

View File

@@ -1,6 +1,8 @@
beautifulsoup4==4.11.1
html5lib==1.1
mwparserfromhell==0.6.4
python-frontmatter==1.0.0
PyYAML==5.1
six==1.16.0
soupsieve==2.3.2.post1
webencodings==0.5.1

84
src/apple.py Normal file
View File

@@ -0,0 +1,84 @@
import json
import urllib.request
import datetime
from bs4 import BeautifulSoup
import re
from html.parser import HTMLParser
URLS = [
"https://support.apple.com/en-us/HT201222", # latest
"https://support.apple.com/kb/HT213078", # 2018-2019
"https://support.apple.com/kb/HT213077", # 2016-2017
"https://support.apple.com/kb/HT209441", # 2015
"https://support.apple.com/kb/HT205762", # 2014
"https://support.apple.com/kb/HT205759", # 2013
"https://support.apple.com/kb/HT204611", # 2011 to 2012
"https://support.apple.com/kb/HT5165", # 2010
"https://support.apple.com/kb/HT4218", # 2008-2009
"https://support.apple.com/kb/HT1263", # 2005-2007
]
# If you are changing these, please
# use https://www.toptal.com/developers/hastebin/mikahukube.txt as your corpus
# to validate your changes
CONFIG = {
"macos": [
# This covers Sierra and beyond
r"macOS [\w ]+ (?P<version>\d{2}(?:\.\d+)+)",
# This covers Mavericks - El Capitan
r"OS X [\w ]+ v?(?P<version>\d{2}(?:\.\d+)+)",
# This covers even older versions (OS X)
r"^Mac OS X [\w ]+ v?(?P<version>\d{2}(?:\.\d+)+)",
],
"ios": [
r"iOS (?P<version>\d+(?:)(?:\.\d+)+)",
r"iPhone v?(?P<version>\d+(?:)(?:\.\d+)+)"
],
"ipados": [
r"iPadOS (?P<version>\d+(?:)(?:\.\d+)+)"
],
"watchos": [
r"watchOS (?P<version>\d+(?:)(?:\.\d+)+)"
]
}
release_lists = {k: {} for k in CONFIG.keys()}
print("::group::apple")
for url in URLS:
with urllib.request.urlopen(url, data=None, timeout=5) as response:
soup = BeautifulSoup(response, features="html5lib")
table = soup.find(id='tableWraper')
for tr in reversed(table.findAll('tr')[1:]):
td_list = tr.findAll('td')
version_text = td_list[0].get_text()
for key,regexes in CONFIG.items():
for regex in regexes:
matches = re.findall(regex, version_text, re.MULTILINE)
if matches:
for version in matches:
try:
abs_date = datetime.datetime.strptime(td_list[2].get_text(), "%d %b %Y")
print_date = abs_date.strftime("%Y-%m-%d")
except:
next
# Only update the date
if version not in release_lists[key]:
release_lists[key][version] = abs_date
print("%s-%s: %s" % (key, version, print_date))
elif release_lists[key][version] < abs_date:
print("%s-%s: %s [IGNORED]" % (key, version, print_date))
elif release_lists[key][version] > abs_date:
# This is a lower date, so we mark it with a bang
print("%s-%s: %s [UPDATED]" % (key, version, print_date))
release_lists[key][version] = abs_date
else:
pass
for k in CONFIG.keys():
with open("releases/%s.json" % k, 'w') as f:
data = {v: d.strftime("%Y-%m-%d") for v,d in release_lists[k].items()}
f.write(json.dumps(data, indent=2))
print("::endgroup::")