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 e17838c
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions snapcraft/parts/plugins/matter_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,23 +115,24 @@ def get_build_snaps(self) -> Set[str]:
def get_build_commands(self) -> List[str]:
commands = []

if self.snap_arch == "arm64":
commands.extend(
[
f"wget --no-verbose https://github.com/project-chip/zap/releases/download/v2023.11.13/zap-linux-{self.snap_arch}.zip",
f"unzip -o zap-linux-{self.snap_arch}.zip",
"echo 'export ZAP_INSTALL_PATH=$PWD'",
]
)
"""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 e17838c

Please sign in to comment.