mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Better checking of available package updates
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (3, 0, "2a2")
|
||||
VERSION = (3, 0, "2a3")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -544,9 +544,19 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
|
||||
if not latest_version:
|
||||
click.echo("[%s]" % (click.style("Unknown", fg="yellow")))
|
||||
return
|
||||
if manifest['version'] == latest_version:
|
||||
|
||||
up_to_date = False
|
||||
try:
|
||||
up_to_date = (
|
||||
semantic_version.Version.coerce(manifest['version']) >=
|
||||
semantic_version.Version.coerce(latest_version))
|
||||
except ValueError:
|
||||
up_to_date = latest_version == manifest['version']
|
||||
|
||||
if up_to_date:
|
||||
click.echo("[%s]" % (click.style("Up-to-date", fg="green")))
|
||||
return
|
||||
|
||||
click.echo("[%s]" % (click.style("Out-of-date", fg="red")))
|
||||
if only_check:
|
||||
return
|
||||
|
Reference in New Issue
Block a user