From ffcd7c6705c4f580f25f628f8d9b0323d6e3f885 Mon Sep 17 00:00:00 2001 From: Mengyi Date: Thu, 7 Mar 2024 13:54:39 +0100 Subject: [PATCH] Stage plugin env script, and flag plugin as experimental --- snapcraft/parts/lifecycle.py | 2 +- tests/spread/plugins/craft-parts/matter-sdk/snapcraft.yaml | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/snapcraft/parts/lifecycle.py b/snapcraft/parts/lifecycle.py index d679a345d6..ced9657a1b 100644 --- a/snapcraft/parts/lifecycle.py +++ b/snapcraft/parts/lifecycle.py @@ -50,7 +50,7 @@ import argparse -_EXPERIMENTAL_PLUGINS = ["kernel"] +_EXPERIMENTAL_PLUGINS = ["kernel, matter-sdk"] def run(command_name: str, parsed_args: "argparse.Namespace") -> None: diff --git a/tests/spread/plugins/craft-parts/matter-sdk/snapcraft.yaml b/tests/spread/plugins/craft-parts/matter-sdk/snapcraft.yaml index 2a38b859a3..995bba1bc0 100644 --- a/tests/spread/plugins/craft-parts/matter-sdk/snapcraft.yaml +++ b/tests/spread/plugins/craft-parts/matter-sdk/snapcraft.yaml @@ -28,13 +28,18 @@ parts: matter-sdk: plugin: matter-sdk matter-sdk-version: "1536ca20c5917578ca40ce509400e97b52751788" # use this commit with ptpython version fix; needs to be updated once matter sdk have a stable release + override-build: | + craftctl default + cp -r $CRAFT_PART_BUILD/matter-sdk-env.sh $CRAFT_PART_INSTALL + stage: + - matter-sdk-env.sh lighting: plugin: nil after: [matter-sdk] override-build: | # Source the Matter SDK environment variables - source ../../matter-sdk/build/matter-sdk-env.sh + source $CRAFT_STAGE/matter-sdk-env.sh # Build the lighting app for snapcraft spread testing purposes cd ../../matter-sdk/build/examples/lighting-app/linux