qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject [1/2] qpid-proton git commit: updated release script for git
Date Fri, 19 Dec 2014 00:22:55 GMT
Repository: qpid-proton
Updated Branches:
  refs/heads/master 3836eebe9 -> 3bffa07d6


updated release script for git


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/e3c9bd5c
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/e3c9bd5c
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/e3c9bd5c

Branch: refs/heads/master
Commit: e3c9bd5c53a1853aa3d5a3ba2e10167378f82777
Parents: 3836eeb
Author: Rafael Schloming <rhs@alum.mit.edu>
Authored: Thu Dec 18 19:19:54 2014 -0500
Committer: Rafael Schloming <rhs@alum.mit.edu>
Committed: Thu Dec 18 19:20:19 2014 -0500

----------------------------------------------------------------------
 bin/release.sh | 87 +++++++++++++----------------------------------------
 1 file changed, 21 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/e3c9bd5c/bin/release.sh
----------------------------------------------------------------------
diff --git a/bin/release.sh b/bin/release.sh
index f397e97..6c09655 100755
--- a/bin/release.sh
+++ b/bin/release.sh
@@ -19,84 +19,39 @@
 # under the License.
 #
 
-# release.sh - Creates release tarballs from the upstream source
-# repository.
-#
+# release.sh - Creates a release branch.
 
 ME=$(basename ${0})
 CURRDIR=$PWD
-die()
-{
-    printf "ERROR: %s\n" "$*"
-    exit 1
-}
-
-URL="http://svn.apache.org/repos/asf/qpid/proton"
-BRANCH="trunk"
-VERSION=""
-REVISION=""
+SRC=$(dirname $(dirname $(readlink -f $0)))
 
 usage()
 {
-    echo "Usage: ${ME} -v VERSION [-u URL] [-b BRANCH] [-r REVISION]"
-    echo "-u URL      The base URL for the repository (def. ${URL})"
-    echo "-b BRANCH   The branch to check out (def. ${BRANCH})"
-    echo "-r REVISION The revision to check out (def. HEAD)"
-    echo "-d          Show verbose debugging output"
-    echo ""
-    exit 0
+    echo "Usage: ${ME} VERSION"
+    exit 1
 }
 
-
-while getopts "hu:b:r:v:d" OPTION; do
-    case $OPTION in
-        h) usage;;
-
-        u) URL=$OPTARG;;
-
-        b) BRANCH=$OPTARG;;
-
-        r) REVISION=$OPTARG;;
-
-        d) set -v;;
-
-        \?) usage;;
-    esac
-done
-
-if [[ -z "${REVISION}" ]]; then
-    # grab a consistent revision to use for all exports
-    REVISION=$(svn info http://svn.apache.org/repos/asf/qpid/proton | fgrep Revision: | awk
'{ print $2 }')
+if [ $# == 1 ]; then
+    VERSION=$1
+else
+    usage
 fi
 
-echo "Using svn revision ${REVISION}."
+die()
+{
+    printf "ERROR: %s\n" "$*"
+    exit 1
+}
 
 ##
-## Create the tarball
+## Create the branch
 ##
-WORKDIR=$(mktemp -d)
-mkdir -p "${WORKDIR}"
 (
-    cd ${WORKDIR}
-    svn export -qr ${REVISION} ${URL}/${BRANCH}/ tmp
-    VERSION=$(cat tmp/version.txt)
-    rootname="qpid-proton-${VERSION}"
-    mv tmp ${rootname}
-
-    cat <<EOF > ${rootname}/SVN_INFO
-Repo: ${URL}
-Branch: ${BRANCH}
-Revision: ${REVISION}
-EOF
-
-    mvn org.codehaus.mojo:versions-maven-plugin:1.2:set org.codehaus.mojo:versions-maven-plugin:1.2:commit
-DnewVersion="${VERSION}" -f ${WORKDIR}/${rootname}/pom.xml
-
-    ##
-    ## Remove content not for release
-    ##
-    rm -r ${rootname}/design
-
-    echo "Generating Archive: ${CURRDIR}/${rootname}.tar.gz"
-    tar zcf ${CURRDIR}/${rootname}.tar.gz ${rootname} \
-        --exclude=.gitignore
+    cd ${SRC}
+    if [ -n "$(git status -uno --porcelain)" ]; then
+        die must release from a clean checkout
+    fi
+    git checkout -b $VERSION origin/master
+    bin/version.sh $VERSION
+    git commit -a -m "Release $VERSION"
 )


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message