Skip to content

Commit b2bd265

Browse files
authored
fix multi line xml tag, and add maven central validation (#6400)
1 parent b4801aa commit b2bd265

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

.github/workflows/new-module-verification.yml

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,23 @@ jobs:
129129
fi
130130
131131
# 2. Check if added to tests-coverage-reporting pom.xml
132-
if ! grep -q "<dependency>.*$MODULE_NAME</dependency>" test/tests-coverage-reporting/pom.xml 2>/dev/null; then
132+
if ! grep -q "<artifactId>$MODULE_NAME</artifactId>" test/tests-coverage-reporting/pom.xml 2>/dev/null; then
133133
echo "::error::Module $MODULE_NAME is not added to tests-coverage-reporting pom.xml"
134134
HAS_ERRORS=1
135135
else
136136
echo "✅ Module is added to tests-coverage-reporting"
137137
fi
138138
139139
# 3. Check if added to aws-sdk-java pom.xml
140-
if ! grep -q "<dependency>.*$MODULE_NAME</dependency>" aws-sdk-java/pom.xml 2>/dev/null; then
140+
if ! grep -q "<artifactId>$MODULE_NAME</artifactId>" aws-sdk-java/pom.xml 2>/dev/null; then
141141
echo "::error::Module $MODULE_NAME is not added to aws-sdk-java pom.xml"
142142
HAS_ERRORS=1
143143
else
144144
echo "✅ Module is added to aws-sdk-java pom.xml"
145145
fi
146146
147147
# 4. Check if added to architecture-tests pom.xml
148-
if ! grep -q "<dependency>.*$MODULE_NAME</dependency>" test/architecture-tests/pom.xml 2>/dev/null; then
148+
if ! grep -q "<artifactId>$MODULE_NAME</artifactId>" test/architecture-tests/pom.xml 2>/dev/null; then
149149
echo "::error::Module $MODULE_NAME is not added to architecture-tests pom.xml"
150150
HAS_ERRORS=1
151151
else
@@ -176,6 +176,31 @@ jobs:
176176
else
177177
echo "✅ Package name mapping is added in .brazil.json"
178178
fi
179+
180+
# 8. Maven Central validation - Check for required tags
181+
echo "Verifying Maven Central requirements..."
182+
183+
if ! grep -q "<name>" "$POM_FILE" 2>/dev/null; then
184+
echo "::error::Maven Central validation: <name> tag is missing in $POM_FILE"
185+
HAS_ERRORS=1
186+
else
187+
echo "✅ Maven Central validation: <name> tag is present"
188+
fi
189+
190+
if ! grep -q "<description>" "$POM_FILE" 2>/dev/null; then
191+
echo "::error::Maven Central validation: <description> tag is missing in $POM_FILE"
192+
HAS_ERRORS=1
193+
else
194+
echo "✅ Maven Central validation: <description> tag is present"
195+
fi
196+
197+
if ! grep -q "<url>" "$POM_FILE" 2>/dev/null; then
198+
echo "::error::Maven Central validation: <url> tag is missing in $POM_FILE"
199+
HAS_ERRORS=1
200+
else
201+
echo "✅ Maven Central validation: <url> tag is present"
202+
fi
203+
179204
echo "::endgroup::"
180205
fi
181206
done

0 commit comments

Comments
 (0)