nmk_workspace.builders

Nmk workspace plugin builders.

Classes

SubProjectsSyncBuilder

Builder for syncing sub-projects in the workspace tree.

SubProjectsBuilder

Builder for sub-projects in the workspace tree.

Module Contents

class nmk_workspace.builders.SubProjectsSyncBuilder(model: nmk.model.model.NmkModel)

Bases: nmk.model.builder.NmkTaskBuilder

Builder for syncing sub-projects in the workspace tree.

build(root: str, to_sync: list[str])

Synchronizes all sub-modules on their git remote branch (the one declared in the .gitmodules file).

Parameters:
  • root – Root path of the workspace

  • to_sync – List of sub-modules to sync

class nmk_workspace.builders.SubProjectsBuilder(model: nmk.model.model.NmkModel)

Bases: nmk.model.builder.NmkTaskBuilder

Builder for sub-projects in the workspace tree.

This builder is used to iterate on workspace sub-projects and trigger nmk build for each.

build(root: str, to_build_first: list[str], to_build: list[str], to_build_after: list[str], excluded: list[str], args: list[str] | str, ignore_failures: bool = False)

Build specified tasks for each sub-project.

Parameters:
  • root – Root path of the workspace

  • to_build_first – List of sub-projects paths to build first

  • to_build – List of all sub-projects paths to be built (including the ones in to_build_first and to_build_after)

  • to_build_after – List of sub-projects paths to build after all the others

  • excluded – List of sub-projects glob patterns to exclude from building

  • args – List of nmk args to use for each sub-project

  • ignore_failures – Whether to ignore failure of sub-project builds