From f00cf1afd2e35bb347c0d89e9ff644e355545101 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Thu, 11 Apr 2024 19:40:43 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20improve=20`pom=20version`=20check=20?= =?UTF-8?q?=E2=9C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pom.xml | 49 +++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 39 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 54a00b2d..11cf536c 100644 --- a/pom.xml +++ b/pom.xml @@ -67,6 +67,8 @@ UTF-8 ${project.build.sourceEncoding} false + ^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$ + ^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)?$ 4.8.4 3.0.2 @@ -305,10 +307,6 @@ - - - 3.3.9 - + + 3.3.9 + + + + project.version + ${maven.enforcer.pom.version.regex} + Project version(${project.version}) format is invalid! + @@ -511,6 +519,7 @@ + enforce-when-release @@ -532,12 +541,6 @@ 21 - - - project.version - ^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)?$|^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$ - "Project version(${project.version}) format is invalid!" - ${maven.compiler.source} @@ -557,6 +560,32 @@ + + enforce-project-version-when-release + + + performRelease + true + + + + ${release.pom.version.regex} + + + + enforce-project-version-when-github-actions-triggered-by-tag + + + + env.GITHUB_REF_TYPE + tag + + + + ${release.pom.version.regex} + + + gen-src