aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cummi...@apache.org
Subject svn commit: r1354206 - /aries/scripts/verify_staged_release.sh
Date Tue, 26 Jun 2012 20:26:11 GMT
Author: cumminsh
Date: Tue Jun 26 20:26:10 2012
New Revision: 1354206

URL: http://svn.apache.org/viewvc?rev=1354206&view=rev
Log:
[ARIES-862] Script for more easily checking staged artefacts.

Added:
    aries/scripts/verify_staged_release.sh   (with props)

Added: aries/scripts/verify_staged_release.sh
URL: http://svn.apache.org/viewvc/aries/scripts/verify_staged_release.sh?rev=1354206&view=auto
==============================================================================
--- aries/scripts/verify_staged_release.sh (added)
+++ aries/scripts/verify_staged_release.sh Tue Jun 26 20:26:10 2012
@@ -0,0 +1,99 @@
+#!/bin/sh
+
+# This script runs the steps described at http://aries.apache.org/development/verifyingrelease.html
+
+STAGING=${1}
+DOWNLOAD=${2:-/tmp/aries-staging}
+mkdir ${DOWNLOAD} 2>/dev/null
+
+# The following code automatically imports the signing KEYS, but it may actually be
+# better to download them from a key server and/or let the user choose what keys
+# he wants to import.
+wget --no-check-certificate -P "${DOWNLOAD}" http://www.apache.org/dist/aries/KEYS
+gpg --import "${DOWNLOAD}/KEYS"
+
+if [ -z "${STAGING}" -o ! -d "${DOWNLOAD}" ]
+then
+	echo "Usage: check_staged_release.sh <staging-number> [temp-directory]"
+	exit
+fi
+
+if [ ! -e "${DOWNLOAD}/${STAGING}" ]
+then
+	echo "################################################################################"
+	echo "                           DOWNLOAD STAGED REPOSITORY                           "
+	echo "################################################################################"
+
+mkdir -p ${DOWNLOAD}/${STAGING}
+
+ wget \
+  -e "robots=off" --wait 1 -r -np "--reject=html,txt,css,css?2.0" "--follow-tags=" \
+  -P "${DOWNLOAD}/${STAGING}" -nH "--cut-dirs=3" --ignore-length --no-check-certificate \
+  "http://repository.apache.org/content/repositories/orgapachearies-${STAGING}/org/apache/aries/"
+
+else
+	echo "################################################################################"
+	echo "                       USING EXISTING STAGED REPOSITORY                         "
+	echo "################################################################################"
+	echo "${DOWNLOAD}/${STAGING}"
+fi
+
+for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep -v '.md5$|.sha1$|index.html|maven-metadata.xml'`
+do     
+	mymd5=`openssl md5 $i |cut -f 2 -d=`
+	repomd5=`cat $i.md5`
+	if [ "$mymd5" == ' '"$repomd5" ]
+		then         echo "GOOD MD5 for $i"
+		else         echo "*FAILURE - BAD MD5 for $i ***** (compared $mymd5 and $repomd5)"
+	fi
+done
+
+for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep -v '.md5$|.sha1$|index.html|maven-metadata.xml'`
+do  
+	mysha1=`openssl sha1 $i|cut -f 2 -d=`
+	reposha1=`cat $i.sha1`
+	if [ "$mysha1" == ' '"$reposha1" ]
+		then         echo "GOOD SHA1 for $i"
+		else         echo "*FAILURE - BAD SHA1 for $i ***** (compared $mysha1 and $reposha1)"
+	fi
+done
+
+for i in `find ${DOWNLOAD}/${STAGING} -type f | egrep '.asc$'`
+do     
+	gpgoutput=`gpg $i`
+	echo ${gpgoutput/BAD/FAILURE: BAD}
+done
+
+
+mkdir ${DOWNLOAD}/${STAGING}-unzips
+
+for i in `find ${DOWNLOAD}/${STAGING} -name *-source-release.zip`
+do
+	unzip -o -d ${DOWNLOAD}/${STAGING}-unzips $i
+	echo **************************
+	echo Building ${i/-source-release.zip/}
+	echo **************************
+
+	cd ${DOWNLOAD}/${STAGING}-unzips/`basename ${i/-source-release.zip/}`
+	mvn clean install
+
+	echo **************************
+	echo Ratting ${i/-source-release.zip/}
+	echo **************************
+	echo '(Suppressing RAT build output to avoid spurious failures)'
+	mvn -fn -Prat &> /dev/null
+
+# Strip out known excluded files (which aren't in the 1.0.0 parent from the rat report 
+	
+	ratresults=`find . -name \*.rat | xargs grep \!\?\? | grep -v DEPENDENCIES | grep -v APPLICATION.MF
| grep -v MANIFEST.MF`
+	echo ${ratresults}
+	echo RAT results:
+	echo ${ratresults/!/RAT FAILURE:}
+
+	cd ..
+	
+done
+
+echo ***** All done! Grep for FAIL in the output to see any issues ****** 
+
+

Propchange: aries/scripts/verify_staged_release.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message