continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1428724 - in /continuum/project: copy-release.sh remove-release.sh
Date Fri, 04 Jan 2013 06:19:52 GMT
Author: brett
Date: Fri Jan  4 06:19:51 2013
New Revision: 1428724

URL: http://svn.apache.org/viewvc?rev=1428724&view=rev
Log:
support skin and parent source releases too

Modified:
    continuum/project/copy-release.sh
    continuum/project/remove-release.sh

Modified: continuum/project/copy-release.sh
URL: http://svn.apache.org/viewvc/continuum/project/copy-release.sh?rev=1428724&r1=1428723&r2=1428724&view=diff
==============================================================================
--- continuum/project/copy-release.sh (original)
+++ continuum/project/copy-release.sh Fri Jan  4 06:19:51 2013
@@ -2,7 +2,7 @@
 
 set -e
 
-if test $# -ne 2 
+if test $# -ne 2
 then
   echo 'usage $0 version (stagingRepoUrl|stagingRepoPath)'
   exit
@@ -56,6 +56,7 @@ function copy_artifact {
       openssl sha1 $output >$output.sha1
       svn add $output.sha1
     )
+    if [[ $? != 0 ]]; then exit $?; fi
   fi
 
   if [[ ! -s $out ]]; then
@@ -74,27 +75,44 @@ svn checkout https://dist.apache.org/rep
 
 cp ./KEYS dist-publish
 
-for i in tar.gz tar.gz.asc zip zip.asc
-do
-  copy_artifact "org.apache.continuum" "continuum-jetty" "bin" $i "apache-continuum-$version-bin.$i"
-  copy_artifact "org.apache.continuum" "continuum-buildagent-jetty" "bin" $i "apache-continuum-buildagent-$version-bin.$i"
-done
-
-for i in war war.asc
-do
-  copy_artifact "org.apache.continuum" "continuum-webapp" "" $i "apache-continuum-$version.$i"
-  copy_artifact "org.apache.continuum" "continuum-buildagent-webapp" "" $i "apache-continuum-buildagent-$version.$i"
-done
-
-for i in zip zip.asc
-do
-  copy_artifact "org.apache.continuum" "continuum" "source-release" $i "apache-continuum-$version-src.$i"
-done
+if [[ $version =~ ^parent- ]]; then
+  version=`echo $version | sed 's/^parent-//'`
+  for i in zip zip.asc
+  do
+    copy_artifact "org.apache.continuum" "continuum-parent" "source-release" $i
+  done
+elif [[ $version =~ ^skin- ]]; then
+  version=`echo $version | sed 's/^skin-//'`
+  for i in zip zip.asc
+  do
+    copy_artifact "org.apache.continuum" "continuum-skin" "source-release" $i
+  done
+else
+  for i in tar.gz tar.gz.asc zip zip.asc
+  do
+    copy_artifact "org.apache.continuum" "continuum-jetty" "bin" $i "apache-continuum-$version-bin.$i"
+    copy_artifact "org.apache.continuum" "continuum-buildagent-jetty" "bin" $i "apache-continuum-buildagent-$version-bin.$i"
+  done
+
+  for i in war war.asc
+  do
+    copy_artifact "org.apache.continuum" "continuum-webapp" "" $i "apache-continuum-$version.$i"
+    copy_artifact "org.apache.continuum" "continuum-buildagent-webapp" "" $i "apache-continuum-buildagent-$version.$i"
+  done
+
+  for i in zip zip.asc
+  do
+    copy_artifact "org.apache.continuum" "continuum" "source-release" $i "apache-continuum-$version-src.$i"
+  done
+fi
+
 )
+if [[ $? != 0 ]]; then exit $?; fi
 
 echo "Check the results and commit the changes in dist-publish"
 (
   cd dist-publish
   svn status
 )
+if [[ $? != 0 ]]; then exit $?; fi
 

Modified: continuum/project/remove-release.sh
URL: http://svn.apache.org/viewvc/continuum/project/remove-release.sh?rev=1428724&r1=1428723&r2=1428724&view=diff
==============================================================================
--- continuum/project/remove-release.sh (original)
+++ continuum/project/remove-release.sh Fri Jan  4 06:19:51 2013
@@ -11,7 +11,7 @@ fi
 function remove_artifact {
   file=$1
 
-  if [[ $file =~ "-src" ]]; then
+  if [[ $file =~ "-src" || $file =~ "-source-release" ]]; then
     outputPath="dist-publish/source"
   else
     outputPath="dist-publish/binaries"
@@ -26,6 +26,7 @@ function remove_artifact {
       svn rm $file.md5
       svn rm $file.sha1
     )
+    if [[ $? != 0 ]]; then exit $?; fi
   fi
 }
 
@@ -36,27 +37,42 @@ cd `dirname $0`
 
 svn checkout https://dist.apache.org/repos/dist/dev/continuum dist-publish
 
-for i in tar.gz tar.gz.asc zip zip.asc
-do
-  remove_artifact "apache-continuum-$version-bin.$i"
-  remove_artifact "apache-continuum-buildagent-$version-bin.$i"
-done
-
-for i in war war.asc
-do
-  remove_artifact "apache-continuum-$version.$i"
-  remove_artifact "apache-continuum-buildagent-$version.$i"
-done
-
-for i in zip zip.asc
-do
-  remove_artifact "apache-continuum-$version-src.$i"
-done
+if [[ $version =~ ^parent- ]]; then
+  version=`echo $version | sed 's/^parent-//'`
+  for i in zip zip.asc
+  do
+    remove_artifact "continuum-parent-$version-source-release.$i"
+  done
+elif [[ $version =~ ^skin- ]]; then
+  version=`echo $version | sed 's/^skin-//'`
+  for i in zip zip.asc
+  do
+    remove_artifact "continuum-skin-$version-source-release.$i"
+  done
+else
+  for i in tar.gz tar.gz.asc zip zip.asc
+  do
+    remove_artifact "apache-continuum-$version-bin.$i"
+    remove_artifact "apache-continuum-buildagent-$version-bin.$i"
+  done
+  
+  for i in war war.asc
+  do
+    remove_artifact "apache-continuum-$version.$i"
+    remove_artifact "apache-continuum-buildagent-$version.$i"
+  done
+  
+  for i in zip zip.asc
+  do
+    remove_artifact "apache-continuum-$version-src.$i"
+  done
+fi
 )
+if [[ $? != 0 ]]; then exit $?; fi
 
 echo "Check the results and commit the changes in dist-publish"
 (
   cd dist-publish
   svn status
 )
-
+if [[ $? != 0 ]]; then exit $?; fi



Mime
View raw message