You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2012/10/19 21:43:58 UTC
svn commit: r1400252 - /qpid/proton/trunk/release.sh
Author: tross
Date: Fri Oct 19 19:43:57 2012
New Revision: 1400252
URL: http://svn.apache.org/viewvc?rev=1400252&view=rev
Log:
PROTON-47 - Added script to generate C and Java tarballs.
Added:
qpid/proton/trunk/release.sh (with props)
Added: qpid/proton/trunk/release.sh
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/release.sh?rev=1400252&view=auto
==============================================================================
--- qpid/proton/trunk/release.sh (added)
+++ qpid/proton/trunk/release.sh Fri Oct 19 19:43:57 2012
@@ -0,0 +1,95 @@
+#!/bin/bash
+#
+# release.sh - Creates release tarballs from the upstream source
+# repository.
+#
+
+ME=$(basename ${0})
+CURRDIR=$PWD
+die()
+{
+ printf "ERROR: %s\n", "$*"
+ exit 1
+}
+
+URL="http://svn.apache.org/repos/asf/qpid/proton"
+BRANCH="trunk"
+VERSION=""
+
+usage()
+{
+ echo "Usage: ${ME} -v VERSION [-u URL] [-b BRANCH] [-c]"
+ echo "-v VERSION Specifies the release version; i.e., 0.18"
+ echo "-u URL The base URL for the repository (def. ${URL})"
+ echo "-b BRANCH The branch to check out (def. ${BRANCH})"
+ echo ""
+ exit 0
+}
+
+
+while getopts "hu:b:v:" OPTION; do
+ case $OPTION in
+ h) usage;;
+
+ v) VERSION=$OPTARG;;
+
+ u) URL=$OPTARG;;
+
+ b) BRANCH=$OPTARG;;
+
+ \?) usage;;
+ esac
+done
+
+if [[ -z "${VERSION}" ]]; then
+ die "You need to specify a version."
+fi
+
+##
+## Create the C Tarball
+##
+rootname="qpid-proton-c-${VERSION}"
+WORKDIR=$(mktemp -d)
+mkdir -p "${WORKDIR}"
+(
+ cd ${WORKDIR}
+ svn export ${URL}/${BRANCH} ${WORKDIR}/${rootname} >/dev/null
+
+ ##
+ ## Remove content not for the C tarball
+ ##
+ rm -f ${rootname}/.gitignore
+ rm -f ${rootname}/config.sh
+ rm -rf ${rootname}/bin
+ rm -rf ${rootname}/examples/broker
+ rm -rf ${rootname}/examples/mailbox
+ rm -rf ${rootname}/proton-j
+ rm -rf ${rootname}/design
+
+ echo "Generating Archive: ${CURRDIR}/${rootname}.tar.gz"
+ tar zcf ${CURRDIR}/${rootname}.tar.gz ${rootname}
+)
+
+##
+## Create the Java Tarball
+##
+rootname="qpid-proton-java-${VERSION}"
+WORKDIR=$(mktemp -d)
+mkdir -p "${WORKDIR}"
+(
+ cd ${WORKDIR}
+ svn export ${URL}/${BRANCH} ${WORKDIR}/${rootname} >/dev/null
+
+ ##
+ ## Remove content not for the Java tarball
+ ##
+ rm -f ${rootname}/.gitignore
+ rm -f ${rootname}/config.sh
+ rm -rf ${rootname}/bin
+ rm -rf ${rootname}/examples
+ rm -rf ${rootname}/proton-c
+ rm -rf ${rootname}/design
+
+ echo "Generating Archive: ${CURRDIR}/${rootname}.tar.gz"
+ tar zcf ${CURRDIR}/${rootname}.tar.gz ${rootname}
+)
Propchange: qpid/proton/trunk/release.sh
------------------------------------------------------------------------------
svn:executable = *
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org