You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2013/03/27 02:14:55 UTC

svn commit: r1461384 - in /pivot/infra: CREATE_RELEASE_WORKFLOW bin/create-tag.sh bin/create-tag_maintenance.sh bin/setup-environment-sample.sh

Author: smartini
Date: Wed Mar 27 01:14:54 2013
New Revision: 1461384

URL: http://svn.apache.org/r1461384
Log:
updated release-creation-related scripts

Added:
    pivot/infra/bin/create-tag_maintenance.sh   (with props)
Modified:
    pivot/infra/CREATE_RELEASE_WORKFLOW
    pivot/infra/bin/create-tag.sh
    pivot/infra/bin/setup-environment-sample.sh

Modified: pivot/infra/CREATE_RELEASE_WORKFLOW
URL: http://svn.apache.org/viewvc/pivot/infra/CREATE_RELEASE_WORKFLOW?rev=1461384&r1=1461383&r2=1461384&view=diff
==============================================================================
--- pivot/infra/CREATE_RELEASE_WORKFLOW (original)
+++ pivot/infra/CREATE_RELEASE_WORKFLOW Wed Mar 27 01:14:54 2013
@@ -29,7 +29,7 @@ so now under the current folder you have
 2 - Setup environment
 The Release process uses the usual pivot builds to generate binary artifacts, 
 so it's better to update all required tools before proceed, 
-for example at the moment the latest JDK for Java 6 is JDK 6 Update 41.
+for example at the moment the latest JDK for Java 6 is JDK 6 Update 43.
 
 Some environment variables are needed, so you need to define them accordingly to your environment.
 As a sample you can look at (but please do NOT commit changes to it):
@@ -64,7 +64,7 @@ svn status -u
 
 4 - Check svn properties
 From the trunk folder, run:
-ant clean
+clear && ant clean
 to cleanup previous build artifacts.
 Note that if Pivot projects (in that folder) has been imported in an IDE (like Eclipse) and compiled there,
 could exist a bin folder in any project, but it has to be deleted before the next step.
@@ -125,6 +125,9 @@ Note: remember to NOT commit the rat.out
 6 - Create the tag in svn
 From the root folder (the parent folder of trunk), for example run:
 ./infra/bin/create-tag.sh <release-number>
+for tagging code from the trunk, or
+./infra/bin/create-tag_maintenance.sh <release-number>
+for tagging code from branches/2.0.x .
 
 Important: if the tag already exist it will not be possible to proceed successfully, so you have to delete the tag by hand, and re-execute this command.
 

Modified: pivot/infra/bin/create-tag.sh
URL: http://svn.apache.org/viewvc/pivot/infra/bin/create-tag.sh?rev=1461384&r1=1461383&r2=1461384&view=diff
==============================================================================
--- pivot/infra/bin/create-tag.sh (original)
+++ pivot/infra/bin/create-tag.sh Wed Mar 27 01:14:54 2013
@@ -24,6 +24,7 @@ create_tag() {
     fi
 
     tag=$1
+    svnpath=trunk
 
     ## Check that we're in an SVN repository folder
     svn info &> /dev/null
@@ -63,9 +64,9 @@ create_tag() {
         exit 1
     fi
 
-    ## Copy the trunk to the tag
-    printf "%-*s" 50 "Creating $tag tag..."
-    svn cp trunk tags/$tag &> /dev/null
+    ## Copy the svn-relative-path to the tag
+    printf "%-*s" 50 "Creating $tag tag for $svnpath ..."
+    svn cp $svnpath tags/$tag &> /dev/null
     if [ $? -ne 0 ]; then
         echo "error"
         echo "Tag creation failed"

Added: pivot/infra/bin/create-tag_maintenance.sh
URL: http://svn.apache.org/viewvc/pivot/infra/bin/create-tag_maintenance.sh?rev=1461384&view=auto
==============================================================================
--- pivot/infra/bin/create-tag_maintenance.sh (added)
+++ pivot/infra/bin/create-tag_maintenance.sh Wed Mar 27 01:14:54 2013
@@ -0,0 +1,110 @@
+#!/bin/bash
+###
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License,
+# Version 2.0 (the "License"); you may not use this file except in
+# compliance with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+###
+
+create_tag() {
+    if [ -z "$@" ]; then
+        echo "Usage: `basename $0` tag"
+        echo
+        exit 1
+    fi
+
+    tag=$1
+    svnpath=branches/2.0.x
+
+    ## Check that we're in an SVN repository folder
+    svn info &> /dev/null
+    if [ $? -ne 0 ]; then
+        echo "Error: Current folder is not managed by SVN"
+        echo
+        exit 1
+    fi
+
+    ## Check that we're at the root of the Pivot repository
+    pivot_root="https://svn.apache.org/repos/asf/pivot"
+    svn_url=`svn info | sed -n 's/URL: //p'`
+    if [ "$svn_url" != "$pivot_root" ]; then
+        echo "Error: Current folder is not the repository root"
+        echo "  Repository Root: $pivot_root"
+        echo "  Current:         $svn_url"
+        echo
+        exit 1
+    fi
+
+    ## Get latest from SVN
+    printf "%-*s" 50 "Getting latest code from SVN..."
+    svn up &> /dev/null
+    if [ $? -ne 0 ]; then
+        echo "error"
+        echo "SVN update failed"
+        echo
+        exit 1
+    else
+        echo "done"
+    fi
+
+    ## Verify that the tag name isn't already taken
+    if [ -e tags/$tag ]; then
+        echo "Error: tags/$tag already exists"
+        echo
+        exit 1
+    fi
+
+    ## Copy the svn-relative-path to the tag
+    printf "%-*s" 50 "Creating $tag tag for $svnpath ..."
+    svn cp $svnpath tags/$tag &> /dev/null
+    if [ $? -ne 0 ]; then
+        echo "error"
+        echo "Tag creation failed"
+        echo
+        exit 1
+    else
+        echo "done"
+    fi
+
+    ## Remove hidden files and folders from the release
+    printf "%-*s" 50 "Removing hidden files and folders from tag..."
+    find tags/$tag -name \.\* | grep -v \.svn | xargs svn rm --force &> /dev/null
+    if [ $? -ne 0 ]; then
+        echo "error"
+        echo "SVN remove failed"
+        echo
+        exit 1
+    else
+        svn up &> /dev/null
+        if [ $? -ne 0 ]; then
+            echo "error"
+            echo "SVN remove failed"
+            echo
+            exit 1
+        fi
+
+        echo "done"
+    fi
+
+    echo
+
+    printf "Submit tag (y/n)? [y] "
+    read submit
+    if [[ "$submit" == "" || "$submit" == "y" || "$submit" == "Y" ]]; then
+        svn ci -m "Created $tag tag" tags/$tag
+    fi
+
+    echo
+}
+
+create_tag $*

Propchange: pivot/infra/bin/create-tag_maintenance.sh
------------------------------------------------------------------------------
    svn:executable = *

Modified: pivot/infra/bin/setup-environment-sample.sh
URL: http://svn.apache.org/viewvc/pivot/infra/bin/setup-environment-sample.sh?rev=1461384&r1=1461383&r2=1461384&view=diff
==============================================================================
--- pivot/infra/bin/setup-environment-sample.sh (original)
+++ pivot/infra/bin/setup-environment-sample.sh Wed Mar 27 01:14:54 2013
@@ -24,8 +24,9 @@ export TEMP_DIR=/tmp
 export OPT=/opt
 
 export ANT_HOME=$OPT/apache-ant-1.8.4
-export JAVA_HOME=$OPT/jdk1.6.0_41
-# export JAVA_HOME=$OPT/jdk1.7.0_15
+# export ANT_HOME=$OPT/apache-ant-1.9.0
+export JAVA_HOME=$OPT/jdk1.6.0_43
+# export JAVA_HOME=$OPT/jdk1.7.0_17
 export MAVEN_HOME=$OPT/apache-maven-2.2.1
 # export MAVEN_HOME=$OPT/apache-maven-3.0.4