continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1428723 - in /continuum/project: ./ copy-release.sh release-script.sh remove-release.sh sync-keys
Date Fri, 04 Jan 2013 05:56:13 GMT
Author: brett
Date: Fri Jan  4 05:56:13 2013
New Revision: 1428723

URL: http://svn.apache.org/viewvc?rev=1428723&view=rev
Log:
update release scripts for svnpubsub

Added:
    continuum/project/copy-release.sh
      - copied, changed from r1428176, continuum/project/release-script.sh
    continuum/project/remove-release.sh   (with props)
Removed:
    continuum/project/release-script.sh
    continuum/project/sync-keys
Modified:
    continuum/project/   (props changed)

Propchange: continuum/project/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Jan  4 05:56:13 2013
@@ -0,0 +1 @@
+dist-publish

Copied: continuum/project/copy-release.sh (from r1428176, continuum/project/release-script.sh)
URL: http://svn.apache.org/viewvc/continuum/project/copy-release.sh?p2=continuum/project/copy-release.sh&p1=continuum/project/release-script.sh&r1=1428176&r2=1428723&rev=1428723&view=diff
==============================================================================
--- continuum/project/release-script.sh (original)
+++ continuum/project/copy-release.sh Fri Jan  4 05:56:13 2013
@@ -1,68 +1,100 @@
-#!/usr/local/bin/bash
-## $Id$ ##
-#$1 version
-#$2 staging repo path on p.a.o
+#!/bin/bash
+
+set -e
 
-set -x
 if test $# -ne 2 
 then
-  echo 'usage release-script.sh version stagingRepoUrl'
+  echo 'usage $0 version (stagingRepoUrl|stagingRepoPath)'
   exit
 fi
-export version=$1
-export repo=$2
 
-mkdir /www/people.apache.org/builds/continuum/$version
-cd /www/people.apache.org/builds/continuum/$version
+function copy_artifact {
+  groupId=$1
+  artifactId=$2
+  classifier=$3
+  ext=$4
+  output=$5
+
+  groupIdPath=`echo $groupId | sed 's#\.#/#g'`
+
+  if [[ -z $classifier ]]; then
+    filename=$artifactId-$version.$ext
+  else
+    filename=$artifactId-$version-$classifier.$ext
+  fi
 
-mkdir binaries
-cd binaries
-for i in tar.gz tar.gz.asc tar.gz.md5 tar.gz.sha1 zip zip.asc zip.md5 zip.sha1
-do
-  wget -O apache-continuum-$version-bin.$i $repo/org/apache/continuum/continuum-jetty/$version/continuum-jetty-$version-bin.$i
-  if [ ! -s apache-continuum-$version-bin.$i ]; then
-    echo Unable to find apache-continuum-$version-bin.$i
-    exit 1
+  path=$repo/$groupIdPath/$artifactId/$version/$filename
+
+  if [[ $classifier == "source-release" ]]; then
+    outputPath="dist-publish/source"
+  else
+    outputPath="dist-publish/binaries"
   fi
-done
 
-for i in tar.gz tar.gz.asc tar.gz.md5 tar.gz.sha1 zip zip.asc zip.md5 zip.sha1
-do
-  wget -O apache-continuum-buildagent-$version-bin.$i $repo/org/apache/continuum/continuum-buildagent-jetty/$version/continuum-buildagent-jetty-$version-bin.$i
-  if [ ! -s apache-continuum-buildagent-$version-bin.$i ]; then
-    echo Unable to find apache-continuum-buildagent-$version-bin.$i
-    exit 1
+  if [[ -z $output ]]; then
+    output=$filename
   fi
-done
 
-for i in war war.asc war.md5 war.sha1
-do
-  wget -O apache-continuum-$version.$i $repo/org/apache/continuum/continuum-webapp/$version/continuum-webapp-$version.$i
-  if [ ! -s apache-continuum-$version.$i ]; then
-    echo Unable to find apache-continuum-$version.$i
+  out="$outputPath/$output"
+
+  if [[ $repo =~ https?:// ]]; then
+    echo "Downloading $path to $out"
+    wget -O $out $path
+  else
+    echo "Copying $path to $out"
+    cp $path $out
+  fi
+
+  svn add $out
+
+  # Regenerate, as the one in the repository will have the wrong filename
+  if [[ ! $ext =~ .asc$ ]]; then
+    (
+      cd $outputPath
+      openssl md5 $output >$output.md5
+      svn add $output.md5
+      openssl sha1 $output >$output.sha1
+      svn add $output.sha1
+    )
+  fi
+
+  if [[ ! -s $out ]]; then
+    echo "Failed: $out"
     exit 1
   fi
+}
+
+version=$1
+repo=`echo $2 | sed 's#/$##'`
+
+(
+cd `dirname $0`
+
+svn checkout https://dist.apache.org/repos/dist/dev/continuum dist-publish
+
+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 war.md5 war.sha1
+for i in war war.asc
 do
-  wget -O apache-continuum-buildagent-$version.$i $repo/org/apache/continuum/continuum-buildagent-webapp/$version/continuum-buildagent-webapp-$version.$i
-  if [ ! -s apache-continuum-buildagent-$version.$i ]; then
-    echo Unable to find apache-continuum-buildagent-$version.$i
-    exit 1
-  fi
+  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
 
-cd ..
-mkdir source
-cd source
-for i in zip zip.asc zip.md5 zip.sha1
+for i in zip zip.asc
 do
-  wget -O apache-continuum-$version-src.$i $repo/org/apache/continuum/continuum/$version/continuum-$version.$i
-  if [ ! -s apache-continuum-$version-src.$i ]; then
-    echo Unable to find apache-continuum-$version-src.$i
-    exit 1
-  fi
+  copy_artifact "org.apache.continuum" "continuum" "source-release" $i "apache-continuum-$version-src.$i"
 done
+)
+
+echo "Check the results and commit the changes in dist-publish"
+(
+  cd dist-publish
+  svn status
+)
 
-echo 'GREAT :-) '

Added: continuum/project/remove-release.sh
URL: http://svn.apache.org/viewvc/continuum/project/remove-release.sh?rev=1428723&view=auto
==============================================================================
--- continuum/project/remove-release.sh (added)
+++ continuum/project/remove-release.sh Fri Jan  4 05:56:13 2013
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+set -e
+
+if test $# -ne 1
+then
+  echo 'usage $0 version'
+  exit
+fi
+
+function remove_artifact {
+  file=$1
+
+  if [[ $file =~ "-src" ]]; then
+    outputPath="dist-publish/source"
+  else
+    outputPath="dist-publish/binaries"
+  fi
+
+  out="$outputPath/$file"
+  svn rm $out
+
+  if [[ ! $file =~ .asc$ ]]; then
+    (
+      cd $outputPath
+      svn rm $file.md5
+      svn rm $file.sha1
+    )
+  fi
+}
+
+version=$1
+
+(
+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
+)
+
+echo "Check the results and commit the changes in dist-publish"
+(
+  cd dist-publish
+  svn status
+)
+

Propchange: continuum/project/remove-release.sh
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/project/remove-release.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message