Ejemplo n.º 1
0
def deploy(path: str, force: bool) -> None:
    """Checks out Mbed program library dependencies at the revision specified in the ".lib" files.

    Ensures all dependencies are resolved and the versions are synchronised to the version specified in the library
    reference.

    PATH: Path to the Mbed project [default: CWD]
    """
    click.echo(
        "Checking out all libraries to revisions specified in .lib files. Resolving any unresolved libraries."
    )
    root_path = pathlib.Path(path)
    deploy_project(root_path, force)
    libs = get_known_libs(root_path)
    _print_dependency_table(libs)
Ejemplo n.º 2
0
    def test_resolves_libs_if_unresolved_detected(self, mock_libs):
        mock_libs().iter_unresolved.return_value = [1]
        path = pathlib.Path("somewhere")
        deploy_project(path)

        mock_libs().fetch.assert_called_once()
Ejemplo n.º 3
0
    def test_checks_out_libraries(self, mock_libs):
        path = pathlib.Path("somewhere")
        deploy_project(path, force=False)

        mock_libs().checkout.assert_called_once_with(force=False)