Skip to content

Commit

Permalink
fix: [OS-49] automate version consistency (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
haniotak authored May 17, 2019
1 parent 4f2e0d6 commit adfa517
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
3 changes: 3 additions & 0 deletions git-hooks/pre-commit.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
mvn -N versions:update-child-modules
git add '*/pom.xml'
47 changes: 46 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,12 @@
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.7</version>
<type>maven-plugin</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
Expand All @@ -264,6 +269,46 @@
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-enforcer-plugin</artifactId>
<version>3.0.0-M2</version>
<executions>
<execution>
<id>enforce-same-version</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<reactorModuleConvergence>
<message>The reactor is not valid</message>
</reactorModuleConvergence>
</rules>
<fail>true</fail>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>io.github.phillipuniverse</groupId>
<artifactId>githook-maven-plugin</artifactId>
<version>1.0.0</version>
<executions>
<execution>
<goals>
<goal>install</goal>
</goals>
<configuration>
<hooks>
<pre-commit>exec git-hooks/pre-commit.sh</pre-commit>
</hooks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

</project>

0 comments on commit adfa517

Please sign in to comment.