0

Make Git tag during deploy

This commit is contained in:
Ronald Jack Jenkins Jr
2017-07-30 20:38:43 -04:00
parent 67b441a5af
commit 686d0f673c
2 changed files with 22 additions and 1 deletions

View File

@@ -19,5 +19,7 @@ deployment:
production: production:
branch: master branch: master
commands: commands:
- mvn -Drtr.disabled=true clean - mvn clean
- mvn -s settings.xml -Drtr.release=true - mvn -s settings.xml -Drtr.release=true
- git tag $(cat .version)
- git push origin $(cat .version)

19
pom.xml
View File

@@ -255,6 +255,25 @@
<build> <build>
<defaultGoal>clean deploy site-deploy</defaultGoal> <defaultGoal>clean deploy site-deploy</defaultGoal>
<plugins> <plugins>
<!-- Write POM version to properties file. -->
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>write-properties-file</id>
<phase>initialize</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<echo message="${project.version}" file="${project.basedir}/.version" />
</target>
</configuration>
</execution>
</executions>
</plugin>
<!-- Generate source JAR. --> <!-- Generate source JAR. -->
<plugin> <plugin>
<artifactId>maven-source-plugin</artifactId> <artifactId>maven-source-plugin</artifactId>