@@ -166,25 +166,40 @@ build_image:
166
166
- chip_head_in_readme=$(awk -F'[][]' '/commit \[.* of connectedhomeip/{print $2}' README.md)
167
167
168
168
# Check both conditions and collect errors
169
- - commit_validation_error =0
169
+ - validation_error =0
170
170
- |
171
171
if echo "$chip_head_commit" | grep -q "^${chip_head_in_readme}"; then
172
- echo "README.md is not in sync with the connectedhomeip submodule"
172
+ echo "README.md is in sync with the connectedhomeip submodule"
173
173
else
174
- echo "Please update the README.md file with the latest commit hash of the connectedhomeip submodule"
175
- commit_validation_error =1
174
+ echo "ERROR: Please update the README.md file with the latest commit hash of the connectedhomeip submodule"
175
+ validation_error =1
176
176
fi
177
177
178
178
- |
179
179
if echo "${chip_head_commit}" | grep -q "^${CHIP_SHORT_HASH}"; then
180
180
echo "The CHIP_SHORT_HASH variable is set to correct value. Matches with current head commit"
181
181
else
182
- echo "The CHIP_SHORT_HASH seems to be incorrect or you have updated the submodule but not the CHIP_SHORT_HASH variable above"
183
- commit_validation_error=1
182
+ echo "ERROR: The CHIP_SHORT_HASH seems to be incorrect or you have updated the submodule but not the CHIP_SHORT_HASH variable above"
183
+ validation_error=1
184
+ fi
185
+
186
+ # Validate if we have the latest ZAP common files
187
+ # python3 is not installed in dind image, so we need to install it
188
+ - apk add --no-cache python3
189
+ # update the submodule to so that script runs based on that submodule
190
+ - git submodule update --init --depth 1 connectedhomeip/connectedhomeip
191
+ - python3 components/esp_matter/zap_common/generate_zap_common_files.py
192
+ - |
193
+ if git diff --quiet components/esp_matter/zap_common; then
194
+ echo "ZAP common files are up to date."
195
+ else
196
+ echo "ERROR: ZAP common files are not up to date."
197
+ echo " Please run ./components/esp_matter/zap_common/generate_zap_common_files.py and commit the changes."
198
+ validation_error=1
184
199
fi
185
200
186
201
# Exit with collected error status
187
- - if [ $commit_validation_error -ne 0 ]; then exit 1; fi
202
+ - if [ $validation_error -ne 0 ]; then exit 1; fi
188
203
189
204
- TAG="chip_${CHIP_SHORT_HASH}_idf_${IDF_VERSION}"
190
205
- echo $TAG
0 commit comments