directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r691932 - /directory/studio/trunk/repository/deploy_new_plugins.sh
Date Thu, 04 Sep 2008 08:49:29 GMT
Author: pamarcelot
Date: Thu Sep  4 01:49:28 2008
New Revision: 691932

URL: http://svn.apache.org/viewvc?rev=691932&view=rev
Log:
Updated the script to package correctly the plugins which are a folder into a zip file.

Modified:
    directory/studio/trunk/repository/deploy_new_plugins.sh

Modified: directory/studio/trunk/repository/deploy_new_plugins.sh
URL: http://svn.apache.org/viewvc/directory/studio/trunk/repository/deploy_new_plugins.sh?rev=691932&r1=691931&r2=691932&view=diff
==============================================================================
--- directory/studio/trunk/repository/deploy_new_plugins.sh (original)
+++ directory/studio/trunk/repository/deploy_new_plugins.sh Thu Sep  4 01:49:28 2008
@@ -19,21 +19,15 @@
 # Looping on each file
 for file in $( ls newplugins ); 
 do
+    # The path to the file
     tmpFile=newplugins/$file
-  
-    # pack to jar file if it's a directory
-    if [ -d $tmpFile ]; 
-    then
-        echo "Zipping directory $tmpFile to $tmpFile.jar"
-        tmpDir=$PWD
-        cd $tmpFile/..
-        zip -r $file.jar $file
-        tmpFile=$tmpFile.jar
-        cd $tmpDir
-    fi
 
-    # Test for _64_ in artifactId
+    # By default the packaging is 'jar'
+    packaging=jar
+
+    # Extracting the groupId, artifactId and version
     case "$file" in
+    # Test for _64_ in artifactId
     *"_64_"*)
         fullname=${file%%_64_*}_64
         groupId=${fullname%\.*}
@@ -51,8 +45,20 @@
         ;;
     esac
     
+    # Pack to zip file if it's a directory
+    if [ -d $tmpFile ]; 
+    then
+        echo "Zipping directory $tmpFile to $tmpFile.zip"
+        tmpDir=$PWD
+        cd $tmpFile
+        zip -r ../$file.zip *
+        tmpFile=$tmpFile.zip
+        cd $tmpDir
+        packaging=zip
+    fi
+    
     echo
-    echo "=> Deploying $groupId:$artifactId:$version to the repository"
+    echo "=> Deploying $groupId:$artifactId:$version:$packaging to the repository"
     
     mvn deploy:deploy-file \
         -Durl=file://$PWD \
@@ -60,7 +66,7 @@
         -DgroupId=$groupId \
         -DartifactId=$artifactId \
         -Dversion=$version \
-        -Dpackaging=jar \
+        -Dpackaging=$packaging \
         -DgeneratePom=true
 
 done
\ No newline at end of file



Mime
View raw message