Skip to content

Commit

Permalink
Add comments for Matter SDK building related commands
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaisHer committed Dec 12, 2023
1 parent 311052a commit 76fa675
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
20 changes: 15 additions & 5 deletions snapcraft/parts/plugins/matter_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,24 @@ def get_build_commands(self) -> List[str]:
]
)

"""Clone Matter repository if not present"""
commands.extend(
[
f"if [ ! -d matter ]; then git clone --depth 1 -b v1.2.0.1 {MATTER_REPO} matter && cd matter; "
f"else cd matter || echo 'skip clone'; fi"
]
)

"""Checkout submodules for Linux platform"""
commands.extend(["scripts/checkout_submodules.py --shallow --platform linux"])

"""Bootstrapping script for building Matter SDK and setting up the environment"""
commands.extend(["set +u && source setup/bootstrap.sh && set -u"])

commands.extend(
[
f"if [ ! -d matter ]; then git clone --depth 1 -b v1.2.0.1 {MATTER_REPO} matter; fi",
"cd matter || echo 'skip clone'",
f"scripts/checkout_submodules.py --shallow --platform linux",
f"set +u && source scripts/activate.sh && set -u",
"cp -vr ./* $CRAFT_PART_INSTALL/",
"echo 'Cloned Matter repository and activated submodules'",
"echo 'Cloned Matter repository and built Matter SDK'",
]
)

Expand Down
3 changes: 2 additions & 1 deletion snapcraft/parts/plugins/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ def register() -> None:
"""Register Snapcraft plugins."""
craft_parts.plugins.register({"colcon": ColconPlugin})
craft_parts.plugins.register({"conda": CondaPlugin})
craft_parts.plugins.register({"matter": MatterPlugin})
craft_parts.plugins.register({"flutter": FlutterPlugin})
craft_parts.plugins.register({"python": PythonPlugin})
craft_parts.plugins.register({"kernel": KernelPlugin})
craft_parts.plugins.register({"matter": MatterPlugin})

0 comments on commit 76fa675

Please sign in to comment.