mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix platform installation from VCS // Resolve #878
This commit is contained in:
@ -14,7 +14,7 @@
|
||||
|
||||
import sys
|
||||
|
||||
VERSION = (3, 3, "0a3")
|
||||
VERSION = (3, 3, "0a4")
|
||||
__version__ = ".".join([str(s) for s in VERSION])
|
||||
|
||||
__title__ = "platformio"
|
||||
|
@ -44,6 +44,15 @@ class PlatformManager(BasePkgManager):
|
||||
def manifest_names(self):
|
||||
return ["platform.json"]
|
||||
|
||||
def get_manifest_path(self, pkg_dir):
|
||||
if not isdir(pkg_dir):
|
||||
return None
|
||||
for name in self.manifest_names:
|
||||
manifest_path = join(pkg_dir, name)
|
||||
if isfile(manifest_path):
|
||||
return manifest_path
|
||||
return None
|
||||
|
||||
def install(self,
|
||||
name,
|
||||
requirements=None,
|
||||
|
@ -60,6 +60,15 @@ def test_install_uknown_from_registry(clirunner, validate_cliresult):
|
||||
assert isinstance(result.exception, exception.UnknownPackage)
|
||||
|
||||
|
||||
def test_install_from_vcs(clirunner, validate_cliresult):
|
||||
result = clirunner.invoke(cli_platform.platform_install, [
|
||||
"https://github.com/platformio/"
|
||||
"platform-espressif8266.git#feature/stage"
|
||||
])
|
||||
validate_cliresult(result)
|
||||
assert "espressif8266_stage" in result.output
|
||||
|
||||
|
||||
def test_install_uknown_version(clirunner, validate_cliresult):
|
||||
result = clirunner.invoke(cli_platform.platform_install,
|
||||
["atmelavr@99.99.99"])
|
||||
|
Reference in New Issue
Block a user