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 ea0e478
Showing 1 changed file with 15 additions and 5 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

0 comments on commit ea0e478

Please sign in to comment.