From 5c74e6ac078929c336933eafa4d3b352132e41c2 Mon Sep 17 00:00:00 2001 From: Andrey Shcheglov Date: Tue, 12 Jul 2022 14:49:22 +0300 Subject: [PATCH] Update the version in `examples/maven/pom.xml` after the release ### What's done: * Now, after each release, the example Maven project version is correctly updated to match the next SNAPSHOT version. --- .github/workflows/release.yml | 6 ++++++ examples/maven/pom.xml | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f05039b3f5..c9ffaf8beb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -85,6 +85,12 @@ jobs: cp diktat-rules/src/main/resources/diktat-analysis.yml $(dirname $file) done next_snapshot_version=$(printf 'VERSION=${project.version}\n0\n' | mvn help:evaluate | grep '^VERSION' | cut -d= -f2) + # Update the version in `examples/maven/pom.xml` + # (which is not a part of the multi-module project). + for file in examples/maven/pom.xml + do + sed -i "s|\(\)[[:digit:]]\(\.[[:digit:]]\)\+-SNAPSHOT\(\)|\1${next_snapshot_version}\3|g" "${file}" || echo "File ${file} hasn't been updated (2nd sed pass)" + done echo "version=$next_snapshot_version" > info/buildSrc/gradle.properties - name: Create pull request uses: peter-evans/create-pull-request@v4 diff --git a/examples/maven/pom.xml b/examples/maven/pom.xml index de15d4fc23..d47946c445 100644 --- a/examples/maven/pom.xml +++ b/examples/maven/pom.xml @@ -5,7 +5,7 @@ org.cqfn.diktat diktat-examples-maven pom - 1.2.1-SNAPSHOT + 1.2.2-SNAPSHOT 1.2.1