File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 8383 echo "generator version: " ${MY_POM_VERSION_GENERATORS}
8484 if [[ $MY_POM_VERSION_GENERATORS =~ ^.*SNAPSHOT$ ]];
8585 then
86- echo "GENERATORS_RELEASE_OK=no" >> $GITHUB_ENV
86+ echo "not releasing snapshot version: " ${MY_POM_VERSION_GENERATORS}
87+ echo "RELEASE_OK=no" >> $GITHUB_ENV
8788 else
88- echo "GENERATORS_RELEASE_OK=yes" >> $GITHUB_ENV
89+ GROUP_ID="io.swagger.codegen.v3"
90+ ARTIFACT_ID="swagger-codegen-generators"
91+ if mvn -q dependency:get -DgroupId=${GROUP_ID} -DartifactId=${ARTIFACT_ID} -Dversion=${MY_POM_VERSION_GENERATORS} > /dev/null 2>&1; then
92+ echo "Version ${MY_POM_VERSION_GENERATORS} already exists in Maven Central."
93+ echo "GENERATORS_RELEASE_OK=no" >> $GITHUB_ENV
94+ else
95+ echo "Version ${MY_POM_VERSION_GENERATORS} does not exist in Maven Central. Will be deployed."
96+ echo "GENERATORS_RELEASE_OK=yes" >> $GITHUB_ENV
97+ fi
8998 fi
9099 echo "generator version: " ${MY_POM_VERSION_GENERATORS}
91100 echo "SC_VERSION_GENERATORS=${MY_POM_VERSION_GENERATORS}" >> $GITHUB_ENV
You can’t perform that action at this time.
0 commit comments