From b2f1e97eaa7d3e7f115c358caa0bbf49a46d737b Mon Sep 17 00:00:00 2001 From: pdragosh Date: Wed, 26 Jun 2019 13:54:26 -0400 Subject: Fix distribution latest tag Eliminating the patch - using Rashmi's changes. Issue-ID: POLICY-1737 Change-Id: I4a790b3da6de823bb744af270f541c0699ed8092 Signed-off-by: pdragosh --- packages/policy-distribution-docker/pom.xml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'packages/policy-distribution-docker/pom.xml') diff --git a/packages/policy-distribution-docker/pom.xml b/packages/policy-distribution-docker/pom.xml index 1e6a606c..02d9658e 100644 --- a/packages/policy-distribution-docker/pom.xml +++ b/packages/policy-distribution-docker/pom.xml @@ -61,19 +61,19 @@ - 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']; @@ -100,7 +100,7 @@ ${project.version} ${project.version}-${maven.build.timestamp} - ${project.docker.latesttag.version} + ${project.docker.latest.minmax.tag.version} -- cgit 1.2.3-korg