Return-Path: Delivered-To: apmail-directory-commits-archive@www.apache.org Received: (qmail 58591 invoked from network); 4 Sep 2008 08:50:30 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Sep 2008 08:50:30 -0000 Received: (qmail 32826 invoked by uid 500); 4 Sep 2008 08:50:28 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 32771 invoked by uid 500); 4 Sep 2008 08:50:28 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 32762 invoked by uid 99); 4 Sep 2008 08:50:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2008 01:50:28 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Sep 2008 08:49:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 82B08238899B; Thu, 4 Sep 2008 01:49:30 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r691932 - /directory/studio/trunk/repository/deploy_new_plugins.sh Date: Thu, 04 Sep 2008 08:49:29 -0000 To: commits@directory.apache.org From: pamarcelot@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080904084930.82B08238899B@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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