summaryrefslogtreecommitdiffstats
path: root/jjb/scripts/maven_push_functions.sh
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2016-08-17 07:21:15 +0200
committerC.J. Collier <cjcollier@linuxfoundation.org>2016-08-17 10:05:33 -0700
commit48ad761f48fb2d4e676bf1aa6779a9e6ee30b44e (patch)
treea88bd15b139ccf19de6f4ed8827d51c009c3d3d0 /jjb/scripts/maven_push_functions.sh
parent217cda840abf623d7a4f46aed8479a6544ed6c88 (diff)
Fix artifactId and version of deployed jars
Jar name can consist of more than two groups separated by a hyphen. Last group should be treated as a version, rest as artifact name. Examples: jvpp-registry-16.09.jar jvpp-16.09.jar Add example jar names to source to ease comprehension Change-Id: Ica0b490c4213224abc70774aa41c60e62f0360f0 Signed-off-by: Marek Gradzki <mgradzki@cisco.com> Signed-off-by: C.J. Collier <cjcollier@linuxfoundation.org>
Diffstat (limited to 'jjb/scripts/maven_push_functions.sh')
-rw-r--r--jjb/scripts/maven_push_functions.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/jjb/scripts/maven_push_functions.sh b/jjb/scripts/maven_push_functions.sh
index 45428e292..6849f314a 100644
--- a/jjb/scripts/maven_push_functions.sh
+++ b/jjb/scripts/maven_push_functions.sh
@@ -50,9 +50,13 @@ function push_jar ()
repoId="${BASEREPOID}snapshot"
url="${BASEURL}snapshot"
+ # examples:
+ # * jvpp-registry-16.09.jar
+ # * jvpp-16.09.jar
+
basefile=$(basename -s .jar "$jarfile")
- artifactId=$(echo "$basefile" | cut -f 1 -d '-')
- version=$(echo "$basefile" | cut -f 2 -d '-')
+ artifactId=$(echo "$basefile" | rev | cut -d '-' -f 2- | rev)
+ version=$(echo "$basefile" | rev | cut -d '-' -f 1 | rev)
push_file "$jarfile" "$repoId" "$url" "${version}-SNAPSHOT" "$artifactId" jar
}