Skip to content

Commit

Permalink
Use plugin name as a prefix for plugin-specific keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaisHer committed Dec 14, 2023
1 parent 76fa675 commit b7c0976
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions snapcraft/parts/plugins/matter_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
class MatterPluginProperties(plugins.PluginProperties, plugins.PluginModel):
"""The part properties used by the matter plugin."""

# matter_branch: str
# zap_version: str
matter_tag: str
matter_zap_tag: str

@classmethod
@overrides
Expand All @@ -46,7 +46,7 @@ def unmarshal(cls, data: Dict[str, Any]) -> "MatterPluginProperties":
plugin_data = plugins.extract_plugin_properties(
data,
plugin_name="matter",
# required=["matter_branch", "zap_version"]
# required=["matter_tag", "matter_zap_tag"]
)
return cls(**plugin_data)

Expand All @@ -58,10 +58,10 @@ class MatterPlugin(plugins.Plugin):
For more information check the 'plugins' topic.
Additionally, this plugin uses the following plugin-specific keywords:
- matter-branch
- matter-tag
(str, no default)
The matter branch to use for the build.
- zap-version
- matter-zap-tag
(str, no default)
The zap version to use for the build.
"""
Expand Down Expand Up @@ -118,7 +118,7 @@ def get_build_commands(self) -> List[str]:
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"wget --no-verbose https://github.com/project-chip/zap/releases/download/{self.matter-zap-tag}/zap-linux-{self.snap_arch}.zip",
f"unzip -o zap-linux-{self.snap_arch}.zip",
"echo 'export ZAP_INSTALL_PATH=$PWD'",
]
Expand All @@ -127,7 +127,7 @@ 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"if [ ! -d matter ]; then git clone --depth 1 -b {self.matter_tag} {MATTER_REPO} matter && cd matter; "
f"else cd matter || echo 'skip clone'; fi"
]
)
Expand Down

0 comments on commit b7c0976

Please sign in to comment.