From a1b6669aebdbca82961c788e4a569282ca7ffe15 Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Fri, 21 Oct 2022 14:56:02 +0200 Subject: [PATCH 1/2] Tweak update-version.sh to allow adjusting released version --- update-version.sh | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/update-version.sh b/update-version.sh index 24e340aa41a5c..a176880f67185 100755 --- a/update-version.sh +++ b/update-version.sh @@ -19,30 +19,30 @@ 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 -r -i "s@[^<]+@${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 -r -i "s@[^<]+@${VERSION}@" extensions/azure-functions-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${VERSION}@" extensions/azure-functions-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${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 -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${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 +sed -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda-http/maven-archetype/src/main/resources/archetype-resources/pom.xml +sed -r -i "s@[^<]+@${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 + sed -r -i "s@[^<]+@${VERSION}@" extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -r -i "s@[^<]+@${VERSION}@" extensions/funqy/funqy-amazon-lambda/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -r -i "s@[^<]+@${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 + sed -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -r -i "s@[^<]+@${VERSION}@" extensions/amazon-lambda-rest/maven-archetype/src/main/resources/archetype-resources/pom.xml + sed -r -i "s@[^<]+@${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 + sed -r -i "s@^ [^<]+@ ${VERSION}@" coverage-report/pom.xml fi From 5dd20b430b552d795ccd7e279ffb5f36750ad6be Mon Sep 17 00:00:00 2001 From: Guillaume Smet Date: Fri, 21 Oct 2022 15:20:52 +0200 Subject: [PATCH 2/2] Use ref of checkout action in publish-3.0.yml --- .github/workflows/publish-3.0.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-3.0.yml b/.github/workflows/publish-3.0.yml index 503ac101dcec1..4562aeb98aeea 100644 --- a/.github/workflows/publish-3.0.yml +++ b/.github/workflows/publish-3.0.yml @@ -15,6 +15,7 @@ jobs: steps: - uses: actions/checkout@v3 with: + ref: ${{ inputs.baseVersion }} token: ${{ secrets.JAKARTA_PUSH_PAT }} - name: Set up JDK 11 uses: actions/setup-java@v3 @@ -33,8 +34,7 @@ jobs: - name: Transform sources run: | export PATH="$HOME/.jbang/bin:$PATH" - git fetch --tags origin - git checkout -b temp-jakarta-rewrite ${{ inputs.baseVersion }} + git checkout -b temp-jakarta-rewrite REWRITE_NO_TESTS=true ./jakarta/transform.sh git push --force origin temp-jakarta-rewrite:3.0 shell: bash