File tree 1 file changed +17
-1
lines changed
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -154,13 +154,29 @@ build_image:
154
154
script :
155
155
- cd ${ESP_MATTER_PATH}
156
156
- chip_head_commit=$(git rev-parse HEAD:connectedhomeip/connectedhomeip)
157
+ - chip_head_in_readme=$(awk -F'[][]' '/commit \[.* of connectedhomeip/{print $2}' README.md)
158
+
159
+ # Check both conditions and collect errors
160
+ - commit_validation_error=0
161
+ - |
162
+ if echo "$chip_head_commit" | grep -q "^${chip_head_in_readme}"; then
163
+ echo "README.md is not in sync with the connectedhomeip submodule"
164
+ else
165
+ echo "Please update the README.md file with the latest commit hash of the connectedhomeip submodule"
166
+ commit_validation_error=1
167
+ fi
168
+
157
169
- |
158
170
if echo "${chip_head_commit}" | grep -q "^${CHIP_SHORT_HASH}"; then
159
171
echo "The CHIP_SHORT_HASH variable is set to correct value. Matches with current head commit"
160
172
else
161
173
echo "The CHIP_SHORT_HASH seems to be incorrect or you have updated the submodule but not the CHIP_SHORT_HASH variable above"
162
- exit 1
174
+ commit_validation_error= 1
163
175
fi
176
+
177
+ # Exit with collected error status
178
+ - if [ $commit_validation_error -ne 0 ]; then exit 1; fi
179
+
164
180
- TAG="chip_${CHIP_SHORT_HASH}_idf_${IDF_VERSION}"
165
181
- echo $TAG
166
182
- |
You can’t perform that action at this time.
0 commit comments