Skip to content

Commit 30d2452

Browse files
authored
feat(matter): adds esp-matter component to update-components.sh
1 parent b070b69 commit 30d2452

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

tools/update-components.sh

+34
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,37 @@ else
1515
git -C "$TINYUSB_REPO_DIR" pull --ff-only
1616
fi
1717
if [ $? -ne 0 ]; then exit 1; fi
18+
19+
echo "Updating Matter v1.3 repository..."
20+
MATTER_REPO_URL="https://github.com/espressif/esp-matter.git"
21+
MATTER_REPO_DIR="$AR_COMPS/espressif__esp-matter"
22+
MATTER_REPO_BRANCH="release/v1.3"
23+
if [ ! -d "$MATTER_REPO_DIR" ]; then
24+
git clone --depth 1 -b "$MATTER_REPO_BRANCH" "$MATTER_REPO_URL" "$MATTER_REPO_DIR"
25+
else
26+
git -C "$MATTER_REPO_DIR" fetch && \
27+
git -C "$MATTER_REPO_DIR" pull --ff-only
28+
fi
29+
if [ $? -ne 0 ]; then exit 1; fi
30+
echo "Updating CHIP v1.3 repository..."
31+
CHIP_REPO_URL="https://github.com/espressif/connectedhomeip.git"
32+
CHIP_REPO_DIR="$AR_COMPS/espressif__esp-matter/connectedhomeip/connectedhomeip"
33+
CHIP_REPO_BRANCH="v1.3-branch"
34+
if [ ! -d "$CHIP_REPO_DIR" ]; then
35+
git clone --depth 1 -b "$CHIP_REPO_BRANCH" "$CHIP_REPO_URL" "$CHIP_REPO_DIR"
36+
$CHIP_REPO_DIR/scripts/checkout_submodules.py --platform esp32 darwin --shallow
37+
else
38+
git -C "$MATTER_REPO_DIR" fetch && \
39+
git -C "$MATTER_REPO_DIR" pull --ff-only
40+
fi
41+
if [ $? -ne 0 ]; then exit 1; fi
42+
echo "Patching CHIP v1.3 repository..."
43+
CHIP_BAD_FILE="$AR_COMPS/espressif__esp-matter/connectedhomeip/connectedhomeip/src/platform/ESP32/bluedroid/ChipDeviceScanner.cpp"
44+
CHIP_PATCH="$AR_PATCHES/matter_chip_ChipDeviceScanner.diff"
45+
if [ ! -e "$CHIP_BAD_FILE" ]; then
46+
patch $CHIP_BAD_FILE $CHIP_PATCH
47+
else
48+
echo "Error: $CHIP_BAD_FILE not found. Check the script."
49+
fi
50+
if [ $? -ne 0 ]; then exit 1; fi
51+
echo "Matter v1.3 component is installed and updated."

0 commit comments

Comments
 (0)