From 9577b90711d293d88581bd2920f77d9f37dd1547 Mon Sep 17 00:00:00 2001 From: Damian Jankowski Date: Tue, 1 Jul 2025 13:25:59 +0200 Subject: [PATCH] downgrade generators back to snapshot version, fix release 3.0.0 workflow --- .github/workflows/release-full-3.yml | 21 ++++----------------- pom.docker.xml | 2 +- pom.xml | 2 +- samples/meta-codegen/pom.xml | 2 +- 4 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/release-full-3.yml b/.github/workflows/release-full-3.yml index 1bcab2a7a2f..501dfaa1f07 100644 --- a/.github/workflows/release-full-3.yml +++ b/.github/workflows/release-full-3.yml @@ -83,10 +83,9 @@ jobs: echo "generator version: " ${MY_POM_VERSION_GENERATORS} if [[ $MY_POM_VERSION_GENERATORS =~ ^.*SNAPSHOT$ ]]; then - echo "not releasing snapshot version: " ${MY_POM_VERSION_GENERATORS} - echo "RELEASE_OK=no" >> $GITHUB_ENV + echo "GENERATORS_RELEASE_OK=no" >> $GITHUB_ENV else - echo "RELEASE_OK=yes" >> $GITHUB_ENV + echo "GENERATORS_RELEASE_OK=yes" >> $GITHUB_ENV fi echo "generator version: " ${MY_POM_VERSION_GENERATORS} echo "SC_VERSION_GENERATORS=${MY_POM_VERSION_GENERATORS}" >> $GITHUB_ENV @@ -112,22 +111,10 @@ jobs: export GENERATORS_VERSION_PROPERTY=-Dswagger-codegen-generators-version=$LAST_SNAP mvn clean install -U -Pdocker -DJETTY_TEST_HTTP_PORT=8090 -DJETTY_TEST_STOP_PORT=8089 ${GENERATORS_VERSION_PROPERTY} - name: Run maven deploy/release for codegen-generators - if: env.RELEASE_OK == 'yes' + if: env.RELEASE_OK == 'yes' && env.GENERATORS_RELEASE_OK == 'yes' working-directory: generators-repo run: | - GENERATORS_CURRENT_VERSION=$(mvn -q -Dswagger-codegen-version=3.0.69 -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:1.3.1:exec) - if [[ $GENERATORS_CURRENT_VERSION =~ SNAPSHOT$ ]]; then - echo "Version is a snapshot: $GENERATORS_CURRENT_VERSION" - else - GROUP_ID="io.swagger.codegen.v3" - ARTIFACT_ID="swagger-codegen-generators" - if mvn -q dependency:get -DgroupId=${GROUP_ID} -DartifactId=${ARTIFACT_ID} -Dversion=${GENERATORS_CURRENT_VERSION} > /dev/null 2>&1; then - echo "Version ${GENERATORS_CURRENT_VERSION} already exists in Maven Central." - else - echo "Version ${GENERATORS_CURRENT_VERSION} does not exist in Maven Central. Deploying" - mvn --no-transfer-progress -B -Prelease deploy - fi - fi + mvn --no-transfer-progress -B -Prelease deploy - name: Run maven deploy/release for codegen if: env.RELEASE_OK == 'yes' run: | diff --git a/pom.docker.xml b/pom.docker.xml index 48efbeb20a6..f8939617a16 100644 --- a/pom.docker.xml +++ b/pom.docker.xml @@ -1107,7 +1107,7 @@ 8 - 1.0.58 + 1.0.58-SNAPSHOT 2.2.28 1.6.15 2.1.25 diff --git a/pom.xml b/pom.xml index 7eb66f46b33..b46c57dd98b 100644 --- a/pom.xml +++ b/pom.xml @@ -1208,7 +1208,7 @@ 8 - 1.0.58 + 1.0.58-SNAPSHOT 2.2.28 1.6.15 2.1.25 diff --git a/samples/meta-codegen/pom.xml b/samples/meta-codegen/pom.xml index 03e48d39ba0..a0074a4aac3 100644 --- a/samples/meta-codegen/pom.xml +++ b/samples/meta-codegen/pom.xml @@ -121,7 +121,7 @@ UTF-8 3.0.70 - 1.0.58 + 1.0.58-SNAPSHOT 1.0.0 4.13.2 3.0.0