[fusionregistry-commitlog] SF.net SVN: fusionregistry: [12] tools/trunk/release.sh
Brought to you by:
copland007
From: SVN c. <fus...@li...> - 2007-06-18 05:29:46
|
Revision: 12 http://fusionregistry.svn.sourceforge.net/fusionregistry/?rev=12&view=rev Author: copland007 Date: 2007-06-17 22:29:48 -0700 (Sun, 17 Jun 2007) Log Message: ----------- Initial import. Added Paths: ----------- tools/trunk/release.sh Added: tools/trunk/release.sh =================================================================== --- tools/trunk/release.sh (rev 0) +++ tools/trunk/release.sh 2007-06-18 05:29:48 UTC (rev 12) @@ -0,0 +1,105 @@ +#!/bin/bash +# +# release.sh: build release +# +# USAGE: release.sh PROJECT TAG RELEASE-VERSION +# +# TAG is the SVN tag of the release +# +# RELEASE-VERSION is the name that will be given to the tarball. +# Eg. if RELEASE-VERSION is v3_0_3 then the tarball will be fusionregistry-v3_0_3.tar.gz +# +# +# $Id$ +# + +if [ $# -lt "3" ] +then + echo + echo "Usage: $0 PROJECT TAG RELEASE-VERSION" + echo " see the comments in this script for more info." + echo + exit 1 +fi + +# This forces all exported releases to be on the same timezone +# when SVN props are used inside files. +TZ=UTC + +PROJECT=$1 +TAG=$2 +RELEASE_VERSION=$3 + +case "$PROJECT" in + fusionregistry) + repos_name="fusionregistry" + ;; + *) + echo + echo "ERROR: '$PROJECT' is an unknown project." + echo " choose one of: fusionregistry" + echo + exit 1 +esac + +dirname="${repos_name}-${RELEASE_VERSION}" + +echo +echo " Tag name: $TAG" +echo " Directory: $dirname" + +if test -d ${dirname}; then + echo "ERROR: for safety, you must manually remove $dirname." + echo + exit 1 +fi + +split="---------------------------------------------------------------------" + +# make sure that the perms are good for the tarball +umask 022 + +echo +echo $split +echo +echo "Starting SVN export of ${repos_name} to $dirname ..." +echo +svn export https://fusionregistry.svn.sourceforge.net/svnroot/${repos_name}/tags/${TAG} ${dirname} + +echo +echo $split +echo +echo "Eliminating unwanted files (e.g. .cvsignore) ..." + +find $dirname -name .cvsignore | xargs rm -f + +echo +echo $split +echo +echo "Building the tarball, .gz and .bz2 files ..." + +tar cf ${dirname}.tar ${dirname} +gzip -9 --to-stdout ${dirname}.tar > ${dirname}.tar.gz +bzip2 -9 -c ${dirname}.tar > ${dirname}.tar.bz2 +rm ${dirname}.tar +zip -9 -r ${dirname}.zip ${dirname} + +echo +echo $split +echo +echo "Generating md5sums ..." + +rm -f ${dirname}.md5 + +ARCH_FORMATS="tar.gz tar.bz2 zip" + +if test -x "`which md5sum 2> /dev/null`"; then + for x in ${ARCH_FORMATS} + do + md5sum ${dirname}.${x} >> ${dirname}.md5 + done +fi + +echo +echo "Completed!" +echo Property changes on: tools/trunk/release.sh ___________________________________________________________________ Name: svn:executable + * Name: svn:keywords + Id Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |