Simplify argument parsing (#459)
With the current state of automation scripts, this is not possible anymore to launch script with multiple auto configs.
This commit is contained in:
27
src/plesk.py
27
src/plesk.py
@@ -1,22 +1,23 @@
|
||||
from common import dates, http, releasedata
|
||||
from common import dates, http
|
||||
from common.releasedata import ProductData, config_from_argv
|
||||
|
||||
"""Fetches versions from Plesk's change log.
|
||||
|
||||
Only 18.0.20.3 and later will be picked up, as the format of the change log for 18.0.20 and 18.0.19 are different and
|
||||
there is no entry for GA of version 18.0.18 and older."""
|
||||
|
||||
for config in releasedata.list_configs_from_argv():
|
||||
with releasedata.ProductData(config.product) as product_data:
|
||||
html = http.fetch_html(config.url)
|
||||
config = config_from_argv()
|
||||
with ProductData(config.product) as product_data:
|
||||
html = http.fetch_html(config.url)
|
||||
|
||||
for release in html.find_all("div", class_="changelog-entry--obsidian"):
|
||||
version = release.h2.text.strip()
|
||||
if not version.startswith('Plesk Obsidian 18'):
|
||||
continue
|
||||
for release in html.find_all("div", class_="changelog-entry--obsidian"):
|
||||
version = release.h2.text.strip()
|
||||
if not version.startswith('Plesk Obsidian 18'):
|
||||
continue
|
||||
|
||||
version = version.replace(' Update ', '.').replace('Plesk Obsidian ', '')
|
||||
if ' ' in version:
|
||||
continue
|
||||
version = version.replace(' Update ', '.').replace('Plesk Obsidian ', '')
|
||||
if ' ' in version:
|
||||
continue
|
||||
|
||||
date = dates.parse_date(release.p.text)
|
||||
product_data.declare_version(version, date)
|
||||
date = dates.parse_date(release.p.text)
|
||||
product_data.declare_version(version, date)
|
||||
|
||||
Reference in New Issue
Block a user