diff --git a/.github/workflows/jakarta-rewrite.yml b/.github/workflows/jakarta-rewrite.yml index bca556e3828c3..bae0706d4ae38 100644 --- a/.github/workflows/jakarta-rewrite.yml +++ b/.github/workflows/jakarta-rewrite.yml @@ -9,7 +9,7 @@ jobs: rewrite: runs-on: ubuntu-latest name: Rewrite to Jakarta - if: github.repository == 'quarkusio/quarkus' + if: github.repository == 'quarkusio/quarkus' || github.event_name == 'workflow_dispatch' steps: - uses: actions/checkout@v3 with: @@ -37,6 +37,22 @@ jobs: git commit -m 'Transform sources to Jakarta' git push --force origin temp-jakarta-rewrite:jakarta-rewrite shell: bash + - name: Adjust version before pushing snapshots + run: | + ./update-version.sh 999-jakarta-SNAPSHOT + shell: bash + - name: Build and Deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_API_TOKEN }} + SERVER_USERNAME: ${{ secrets.SERVER_USERNAME }} + SERVER_PASSWORD: ${{ secrets.SERVER_PASSWORD }} + run: | + ./mvnw -e -B --settings .github/mvn-settings.xml \ + -DskipITs -DskipTests -Dskip.gradle.tests -Dno-format -Dinvoker.skip=true \ + -DretryFailedDeploymentCount=10 \ + -pl !integration-tests/gradle \ + -pl '!:quarkus-integration-test-infinispan-client' -pl '!:quarkus-integration-test-kafka-avro' \ + clean deploy - name: Report status if: "always() && github.repository == 'quarkusio/quarkus'" shell: bash diff --git a/update-version.sh b/update-version.sh new file mode 100755 index 0000000000000..917c95f3b02eb --- /dev/null +++ b/update-version.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +set -e -u -o pipefail +shopt -s failglob + +if [ $# -eq 0 ]; then + echo "Release version required" + exit 1 +fi +VERSION=$1 + +./mvnw versions:set -DnewVersion="${VERSION}" -DgenerateBackupPoms=false -DprocessAllModules -Prelocations + +if [ -f devtools/gradle/gradle.properties ]; then + sed -i -r "s/^version( ?= ?).*$/version\1${VERSION}/" devtools/gradle/gradle.properties +fi + +if [ -f integration-tests/gradle/gradle.properties ]; then + sed -i -r "s/^version( ?= ?).*$/version\1${VERSION}/" integration-tests/gradle/gradle.properties +fi + +sed -i "s@999-SNAPSHOT@${VERSION}@" independent-projects/tools/pom.xml + +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/azure-functions-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/azure-functions-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/azure-functions-http/maven-archetype/src/main/resources/archetype-resources/pom.xml + +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml + +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-http/maven-archetype/src/main/resources/archetype-resources/pom.xml + +if [ -f extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml ]; then + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml +fi +if [ -f extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml ]; then + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -i "s@999-SNAPSHOT@${VERSION}@" extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml +fi +if [ -f coverage-report/pom.xml ]; then + sed -i "s@999-SNAPSHOT@${VERSION}@" coverage-report/pom.xml +fi