forked from platformio/platformio-core
Better checking of available package updates
This commit is contained in:
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
VERSION = (3, 0, "2a2")
|
VERSION = (3, 0, "2a3")
|
||||||
__version__ = ".".join([str(s) for s in VERSION])
|
__version__ = ".".join([str(s) for s in VERSION])
|
||||||
|
|
||||||
__title__ = "platformio"
|
__title__ = "platformio"
|
||||||
|
@ -544,9 +544,19 @@ class BasePkgManager(PkgRepoMixin, PkgInstallerMixin):
|
|||||||
if not latest_version:
|
if not latest_version:
|
||||||
click.echo("[%s]" % (click.style("Unknown", fg="yellow")))
|
click.echo("[%s]" % (click.style("Unknown", fg="yellow")))
|
||||||
return
|
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")))
|
click.echo("[%s]" % (click.style("Up-to-date", fg="green")))
|
||||||
return
|
return
|
||||||
|
|
||||||
click.echo("[%s]" % (click.style("Out-of-date", fg="red")))
|
click.echo("[%s]" % (click.style("Out-of-date", fg="red")))
|
||||||
if only_check:
|
if only_check:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user