Fix up push script repoId selector and classifications 36/36/1
authorAndrew Grimberg <[email protected]>
Thu, 10 Dec 2015 14:30:36 +0000 (06:30 -0800)
committerAndrew Grimberg <[email protected]>
Thu, 10 Dec 2015 14:30:36 +0000 (06:30 -0800)
The settings files use a - separator for the repoIDs so we need to make
sure that we're concatenating against a - instead of .

Additionally we're tightening up the version classification of the
pushed objects. This may not be 100% still but it should be better than
what we were attempting previously.

Change-Id: I726f9d87c3441357701ad79b7357a337c6636a42
Signed-off-by: Andrew Grimberg <[email protected]>
jjb/vpp/include-raw-vpp-maven-push.sh

index a625ed4..d09cf82 100644 (file)
@@ -9,7 +9,7 @@ fi
 MVN="${HOME}/tools/hudson.tasks.Maven_MavenInstallation/${MAVEN_SELECTOR}/bin/mvn"
 GROUP_ID="info.projectrotterdam.${PROJECT}"
 BASEURL="${NEXUSPROXY}/content/repositories/rotterdam."
-BASEREPOID='rotterdam.'
+BASEREPOID='rotterdam-'
 
 # find the files
 JARS=$(find . -type f -iname '*.jar')
@@ -49,7 +49,7 @@ function push_jar ()
     artifactId=$(echo "$basefile" | cut -f 1 -d '-')
     version=$(echo "$basefile" | cut -f 2 -d '-')
 
-    push_file "$jarfile" "$repoId" "$url" "$version" "$artifactId" jar
+    push_file "$jarfile" "$repoId" "$url" "${version}-SNAPSHOT" "$artifactId" jar
 }
 
 function push_deb ()
@@ -58,11 +58,11 @@ function push_deb ()
     repoId="${BASEREPOID}release"
     url="${BASEURL}release"
 
-    basefile=$(basename -s _amd64.deb "$debfile")
+    basefile=$(basename -s .deb "$debfile")
     artifactId=$(echo "$basefile" | cut -f 1 -d '_')
-    version=$(echo "$basefile" | cut -f 2 -d '_')
+    version=$(echo "$basefile" | cut -f 2- -d '_')
 
-    push_file "$debfile" "$repoId" "$url" "$version" "$artifactId" deb _amd64
+    push_file "$debfile" "$repoId" "$url" "${version}_amd64" "$artifactId" deb
 }
 
 for i in $JARS