Skip to content

Commit 8f1fd07

Browse files
authored
Merge pull request #3251 from OpenFeign/fix/validate-bom-before-publish
fix: validate BOM has dependencies before publishing
2 parents 8a7fc5d + 46c136f commit 8f1fd07

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.circleci/config.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ commands:
116116
echo "Skipping BOM publish for SNAPSHOT version $BOM_VERSION"
117117
exit 0
118118
fi
119+
DEP_COUNT=$(grep -c '<artifactId>feign-' "$BOM_POM" || true)
120+
if [ "$DEP_COUNT" -eq 0 ]; then
121+
echo "ERROR: BOM has no feign dependencies, refusing to publish an empty BOM"
122+
exit 1
123+
fi
124+
echo "BOM contains $DEP_COUNT feign dependencies"
119125
STAGING_DIR=/tmp/bom-staging/io/github/openfeign/feign-bom/$BOM_VERSION
120126
mkdir -p "$STAGING_DIR"
121127
cp "$BOM_POM" "$STAGING_DIR/feign-bom-${BOM_VERSION}.pom"

0 commit comments

Comments
 (0)