aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/policy-pap-docker/pom.xml34
1 files changed, 14 insertions, 20 deletions
diff --git a/packages/policy-pap-docker/pom.xml b/packages/policy-pap-docker/pom.xml
index e839b63e..4aecace4 100644
--- a/packages/policy-pap-docker/pom.xml
+++ b/packages/policy-pap-docker/pom.xml
@@ -60,25 +60,19 @@
</goals>
<configuration>
<source>
- println 'Project version: ' + project.properties['dist.project.version'];
- def
- versionArray;
- if ( project.properties['dist.project.version'] != null ) {
- versionArray =
- project.properties['dist.project.version'].split('-');
+ println 'Project version: ' + project.properties['dist.project.version']
+ if (project.properties['dist.project.version'] != null) {
+ def versionArray = project.properties['dist.project.version'].split('-')
+ def minMaxVersionArray = versionArray[0].tokenize('.')
+ if (project.properties['dist.project.version'].endsWith("-SNAPSHOT")) {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-SNAPSHOT-latest"
+ } else {
+ project.properties['project.docker.latest.minmax.tag.version'] =
+ minMaxVersionArray[0] + "." + minMaxVersionArray[1] + "-STAGING-latest"
+ }
+ println 'New tag for docker: ' + project.properties['project.docker.latest.minmax.tag.version']
}
-
- if (
- project.properties['dist.project.version'].endsWith("-SNAPSHOT") ) {
- project.properties['project.docker.latesttag.version']=versionArray[0] +
- "-SNAPSHOT-latest";
- } else {
- project.properties['project.docker.latesttag.version']=versionArray[0] +
- "-STAGING-latest";
- }
-
- println 'New tag for docker: ' +
- project.properties['project.docker.latesttag.version'];
</source>
</configuration>
</execution>
@@ -105,7 +99,7 @@
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>
- <tag>${project.docker.latesttag.version}</tag>
+ <tag>${project.docker.latest.minmax.tag.version}</tag>
</tags>
<assembly>
<inline>
@@ -178,4 +172,4 @@
<type>tar.gz</type>
</dependency>
</dependencies>
-</project> \ No newline at end of file
+</project>