Skip to content

Commit

Permalink
chore: add pom version check βœ…
Browse files Browse the repository at this point in the history
after released wrong pom version `v2.14.4` πŸ˜–

https://maven.apache.org/enforcer/enforcer-rules/requireProperty.html
  • Loading branch information
oldratlee committed Dec 10, 2023
1 parent 80cc6d2 commit 36d9665
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,23 @@
</rules>
</configuration>
</execution>
<execution>
<id>enforce-property</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<!-- https://maven.apache.org/enforcer/enforcer-rules/requireProperty.html -->
<requireProperty>
<property>project.version</property>
<regex>^\d\.\d+\.\d+(-(Alpha|Beta|RC)\d+)?$|^\d(\.\d+)?\.(\d+|x)-SNAPSHOT$</regex>
<regexMessage>"Project version(${project.version}) format is invalid!"</regexMessage>
</requireProperty>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
Expand Down

0 comments on commit 36d9665

Please sign in to comment.