[364432]Build process enhancement: auto tag and update the map files
diff --git a/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh b/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
index a61964e..1994d1d 100644
--- a/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
+++ b/plugins/org.eclipse.datatools.releng.builder/bootstrap.sh
@@ -1,261 +1,334 @@
-# User specific environment and startup programs

-umask 002

-

-BASE_PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin

-LD_LIBRARY_PATH=.

-BASH_ENV=$HOME/.bashrc

-USERNAME=`whoami`

-xhost +$HOSTNAME

-DISPLAY=:0.0

-export DISPLAY

-

-CVSROOT=:ext:xgu@dev.eclipse.org:/cvsroot/datatools

-CVS_RSH=ssh

-ulimit -c unlimited

-export CVSROOT CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY

-

-#cvs update -r HEAD -C -d buildAll.xml build.xml eclipse extras

-#dos2unix extras/updateFeatureTag.sh extras/checkCompareDone.sh

-#chmod -R +x build.xml buildAll.xml eclipse extras

-

-if [ "x"$ANT_HOME = "x" ]; then export ANT_HOME=/usr/local/apache-ant-1.7.0; fi

-if [ "x"$JAVA_HOME = "x" ]; then export JAVA_HOME=/usr/local/j2sdk1.4.2_13; fi

-export PATH=${PATH}:${ANT_HOME}/bin:/usr/local/bin

-

-proc=$$

-

-#notification list

-recipients=yjiang@actuate.com,xgu@actuate.com

-sender=qa-build@actuate.com

-

-#sets skip.performance.tests Ant property

-skipPerf=""

-

-#sets skip.tests Ant property

-skipTest=""

-

-#sets sign Ant property

-sign=""

-

-tagMaps=""

-

-#sets fetchTag="HEAD" for nightly builds if required

-tag=""

-

-#buildProjectTags=v20060524

-buildProjectTags=v20060529

-

-#updateSite property setting

-updateSite=""

-

-#flag indicating whether or not mail should be sent to indicate build has started

-mail=""

-

-#flag used to build based on changes in map files

-compareMaps=""

-

-#buildId - build name

-buildId=""

-

-#buildLabel - name parsed in php scripts <buildType>-<buildId>-<datestamp>

-buildLabel=""

-

-# tag for build contribution project containing .map files

-mapVersionTag=HEAD

-

-# directory in which to export builder projects

-builderDir=/home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/

-

-# buildtype determines whether map file tags are used as entered or are replaced with HEAD

-buildType=I

-

-# directory where to copy build

-postingDirectory=/home/adb/releng/BIRTOutput/dtp.output/1.9.1

-

-# flag to indicate if test build

-testBuild=""

-

-# path to javadoc executable

-javadoc=""

-

-# value used in buildLabel and for text replacement in index.php template file

-builddate=`date +%Y%m%d`

-buildtime=`date +%H%M`

-

-buildinfoDate=`date +%F%t%H:%M:%S`

-buildinfounivDate=`date +%c%z`

-

-timestamp=$builddate$buildtime

-

-echo "======[builddate]: $builddate " > adb.log

-echo "======[buildtime]: $buildtime " >> adb.log

-echo "======[timestamp]: $timestamp " >> adb.log

-

-# process command line arguments

-usage="usage: $0 [-notify emailaddresses][-test][-buildDirectory directory][-buildId name][-buildLabel directory name][-tagMapFiles][-mapVersionTag tag][-builderTag tag][-bootclasspath path][-compareMaps][-skipPerf] [-skipTest][-updateSite site][-sign] M|N|I|S|R"

-

-if [ $# -lt 1 ]

-then

-		 echo >&2 "$usage"

-		 exit 1

-fi

-

-while [ $# -gt 0 ]

-do

-		 case "$1" in

-		 		 -buildId) buildId="$2"; shift;;

-		 		 -buildLabel) buildLabel="$2"; shift;;

-		 		 -mapVersionTag) mapVersionTag="$2"; shift;;

-		 		 -tagMapFiles) tagMaps="-DtagMaps=true";;

-		 		 -noSign) noSign="-DnoSign=true";;

-		 		 -skipPerf) skipPerf="-Dskip.performance.tests=true";;

-		 		 -skipTest) skipTest="-Dskip.tests=true";;

-		 		 -buildDirectory) builderDir="$2"; shift;;

-		 		 -notify) recipients="$2"; shift;;

-		 		 -test) postingDirectory="/builds/transfer/files/bogus/downloads/drops";testBuild="-Dtest=true";;

-		 		 -builderTag) buildProjectTags="$2"; shift;;

-		 		 -compareMaps) compareMaps="-DcompareMaps=true";;

-		 		 -updateSite) updateSite="-DupdateSite=$2";shift;;

-		 		 -sign) sign="-Dsign=true";shift;;

-                                 -upload) upload=true;;

-		 		 -*)

-		 		 		 echo >&2 $usage

-		 		 		 exit 1;;

-		 		 *) break;;		 # terminate while loop

-		 esac

-		 shift

-done

-

-# After the above the build type is left in $1.

-buildType=$1

-echo "======[buildType]: $buildType " >> adb.log

-

-# Set default buildId and buildLabel if none explicitly set

-if [ "$buildId" = "" ]

-then

-		 #buildId=$buildType$builddate-$buildtime

-		 buildId=v$builddate-$buildtime

-fi

-

-if [ "$buildLabel" = "" ]

-then

-		 buildLabel=$buildId

-fi

-echo "======[buildId]: $buildId " >> adb.log

-

-#Set the tag to HEAD for Nightly builds

-if [ "$buildType" = "N" ]

-then

-        tag="-DfetchTag=CVS=HEAD,GIT=master"

-        versionQualifier="-DforceContextQualifier=$buildId"

-fi

-

-echo "======[tag]: $tag" >> adb.log

-echo "======[versionQualifier]: $versionQualifier" >> adb.log

-

-# tag for eclipseInternalBuildTools on ottcvs1

-internalToolsTag=$buildProjectTags

-echo "======[internalToolsTag]: $internalToolsTag" >> adb.log

-

-# tag for exporting org.eclipse.releng.basebuilder

-baseBuilderTag=$buildProjectTags

-echo "======[baseBuilderTag]: $baseBuilderTag" >> adb.log

-

-# tag for exporting the custom builder

-customBuilderTag=$buildProjectTags

-echo "======[customBuilderTag]: $customBuilderTag" >> adb.log

-

-#if [ -e $builderDir ]

-#then

-#	 builderDir=$builderDir$timestamp

-#fi

-

-# directory where features and plugins will be compiled

-buildDirectory=/home/adb/releng.dtp.191/BIRT_Build_Dir

-

-echo "======[buildDirectory]: $buildDirectory" >> adb.log

-

-mkdir $builderDir

-cd $builderDir

-

-

-

-mkdir -p $postingDirectory/$buildLabel

-chmod -R 755 $builderDir

-

-#default value of the bootclasspath attribute used in ant javac calls.  

-bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jce.jar"

-#bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar"

-bootclasspath_15="/usr/local/jdk1.5.0_02/jre/lib/rt.jar:/usr/local/jdk1.5.0_02/jre/lib/jce.jar"

-bootclasspath_16="/usr/local/jdk1.6.0/jre/lib/rt.jar:/usr/local/jdk1.6.0/jre/lib/jsse.jar"

-jvm15_home="/usr/local/jdk1.5.0_02"

-

-cd /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder

-

-echo buildId=$buildId >> monitor.properties 

-echo timestamp=$timestamp >> monitor.properties 

-echo buildLabel=$buildLabel >> monitor.properties 

-echo currentDay=$builddate >> monitor.properties

-echo recipients=$recipients >> monitor.properties

-echo sender=$sender >> monitor.properties

-echo log=$postingDirectory/$buildLabel/index.php >> monitor.properties

-

-#the base command used to run AntRunner headless

-antRunner="/usr/local/jdk1.5.0_09/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"

-#antRunner="/usr/local/j2sdk1.4.2_13/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"

-

-echo "==========[antRunner]: $antRunner" >> adb.log

-

-

-#/home/adb/releng.dtp.191/BIRTBuilder/replaceBuildInfo.sh $buildinfoDate $buildinfounivDate

-

-#clean drop directories

-

-#full command with args

-#buildId=v20110808-1451

-echo $tagMaps >> adb.log

-echo $compareMaps >> adb.log

-

-

-#cp /home/adb/releng.dtp.191/dtpURLmonitor.properties /home/adb/releng.260/src/

-

-#cp /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/customTargets.xml /home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/eclipse/buildConfigs/dtp.sdk.all/

-

-buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps \

--DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory \

--Dbootclasspath=$bootclasspath_15 -DbuildType=$buildType -D$buildType=true \

--DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildId -Dtimestamp=$timestamp $skipPerf $skipTest $tagMaps $noSign \

--DJ2SE-1.5=$bootclasspath_15 -DJavaSE-1.6=$bootclasspath_16 -DlogExtension=.xml $javadoc $updateSite $sign \

--Djava15-home=$bootclasspath_15 -DbuildDirectory=/home/adb/releng.dtp.191/src \

--DbaseLocation=/home/adb/releng.dtp.191/baseLocation -Dwtp.home=/home/adb/releng.dtp.191/baseLocation \

--DgroupConfiguration=true -DjavacVerbose=true -DjavacFailOnError=false \

--Dbasebuilder=/home/adb/releng.dtp.191/org.eclipse.releng.basebuilder  \

--Djvm15_home=$jvm15_home  -DmapTag.properties=/home/adb/releng.dtp.191/org.eclipse.datatools.releng.builder/mapTag.properties \

--Dbuild.date=$builddate -Dpackage.version=1.9.1RC1-$timestamp \

--DmapGitRoot=ssh://xgu@git.eclipse.org/gitroot/datatools \

--DmapVersionTag=master -DBranchVersion=1.9.1 -DjavacTarget=1.5 -DjavacSource=1.5 \

--Dusername.sign=slee -Dpassword.sign= -Dhostname.sign=build.eclipse.org -Dhome.dir=/home/data/users/slee -Dsign.dir=/home/data/httpd/download-staging.priv/birt"

-

-#-DmapCvsRoot=:ext:xgu@dev.eclipse.org:/cvsroot/datatools \

-#-Ddtp.url.token=:ext:xgu@dev.eclipse.org:/cvsroot/datatools \

-#-Ddtp.url.newvalue=:ext:xgu@192.168.218.218:/cvsroot/datatools"

-

-#skipPreBuild

-

-#capture command used to run the build

-echo $buildCommand>command.txt

-

-#run the build

-$buildCommand >> adb.log

-#retCode=$?

-#

-#if [ $retCode != 0 ]

-#then

-#        echo "Build failed (error code $retCode)."

-#        exit -1

-#fi

-

-#clean up

-#rm -rf $builderDir

-rm -rf /home/adb/releng.dtp.191/src/$buildId

-cp -f /home/adb/releng.dtp.191/src/directory.txt last_directory.txt

+# User specific environment and startup programs
+umask 002
+
+BASE_PATH=.:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin
+LD_LIBRARY_PATH=.
+BASH_ENV=$HOME/.bashrc
+USERNAME=`whoami`
+xhost +$HOSTNAME
+DISPLAY=:0.0
+export DISPLAY
+
+CVSROOT=:ext:xgu@dev.eclipse.org:/cvsroot/datatools
+CVS_RSH=ssh
+ulimit -c unlimited
+export CVSROOT CVS_RSH USERNAME BASH_ENV LD_LIBRARY_PATH DISPLAY
+
+
+export GitRepo=ssh://xgu@git.eclipse.org/gitroot/datatools/org.eclipse.datatools.build.git
+export BranchName=master
+rm -rf plugins
+git archive --format=tar --remote=$GitRepo $BranchName plugins/org.eclipse.datatools.releng.builder | tar -xf -
+cp -f plugins/org.eclipse.datatools.releng.builder/buildAll.xml ./
+cp -f plugins/org.eclipse.datatools.releng.builder/build.xml ./
+cp -f plugins/org.eclipse.datatools.releng.builder/git-map.sh ./
+cp -f plugins/org.eclipse.datatools.releng.builder/git-submission.sh ./
+cp -rf plugins/org.eclipse.datatools.releng.builder/eclipse ./
+cp -rf plugins/org.eclipse.datatools.releng.builder/extras ./
+
+if [ "x"$ANT_HOME = "x" ]; then export ANT_HOME=/usr/local/apache-ant-1.7.0; fi
+if [ "x"$JAVA_HOME = "x" ]; then export JAVA_HOME=/usr/local/j2sdk1.4.2_13; fi
+export PATH=${PATH}:${ANT_HOME}/bin:/usr/local/bin
+
+proc=$$
+
+#notification list
+recipients=yjiang@actuate.com,xgu@actuate.com
+
+#sets skip.performance.tests Ant property
+skipPerf=""
+
+#sets skip.tests Ant property
+skipTest=""
+
+#sets sign Ant property
+sign=""
+
+tagMaps=""
+
+#sets fetchTag="HEAD" for nightly builds if required
+tag=""
+
+#buildProjectTags=v20060524
+buildProjectTags=v20060529
+
+#updateSite property setting
+updateSite=""
+
+#flag indicating whether or not mail should be sent to indicate build has started
+mail=""
+
+#flag used to build based on changes in map files
+compareMaps=""
+
+#buildId - build name
+buildId=""
+
+#buildLabel - name parsed in php scripts <buildType>-<buildId>-<datestamp>
+buildLabel=""
+
+# tag for build contribution project containing .map files
+mapVersionTag=HEAD
+
+# directory in which to export builder projects
+builderDir=$HOME/releng.dtp.192/org.eclipse.datatools.releng.builder
+
+# buildtype determines whether map file tags are used as entered or are replaced with HEAD
+buildType=I
+
+# directory where to copy build
+postingDirectory=$HOME/releng/BIRTOutput/dtp.output/1.9.2
+
+# flag to indicate if test build
+testBuild=""
+
+# path to javadoc executable
+javadoc=""
+
+# value used in buildLabel and for text replacement in index.php template file
+builddate=`date +%Y%m%d`
+buildtime=`date +%H%M`
+
+buildinfoDate=`date +%F%t%H:%M:%S`
+buildinfounivDate=`date +%c%z`
+
+timestamp=$builddate$buildtime
+
+echo "======[builddate]: $builddate " > $USER.log
+echo "======[buildtime]: $buildtime " >> $USER.log
+echo "======[timestamp]: $timestamp " >> $USER.log
+
+# process command line arguments
+usage="usage: $0 [-notify emailaddresses][-test][-buildDirectory directory][-buildId name][-buildLabel directory name][-tagMapFiles][-mapVersionTag tag][-builderTag tag][-bootclasspath path][-compareMaps][-skipPerf] [-skipTest][-updateSite site][-sign] M|N|I|S|R"
+
+if [ $# -lt 1 ]
+then
+		 echo >&2 "$usage"
+		 exit 1
+fi
+
+while [ $# -gt 0 ]
+do
+		 case "$1" in
+		 		 -buildId) buildId="$2"; shift;;
+		 		 -buildLabel) buildLabel="$2"; shift;;
+		 		 -mapVersionTag) mapVersionTag="$2"; shift;;
+				 -noAutoTag) noAutoTag=true;;
+				 -ForceAutoTag) ForceAutoTag=true;;
+		 		 -tagMapFiles) tagMaps="-DtagMaps=true";;
+		 		 -noSign) noSign="-DnoSign=true";;
+		 		 -skipPerf) skipPerf="-Dskip.performance.tests=true";;
+		 		 -skipTest) skipTest="-Dskip.tests=true";;
+		 		 -buildDirectory) builderDir="$2"; shift;;
+		 		 -notify) recipients="$2"; shift;;
+		 		 -test) postingDirectory="/builds/transfer/files/bogus/downloads/drops";testBuild="-Dtest=true";;
+		 		 -builderTag) buildProjectTags="$2"; shift;;
+		 		 -compareMaps) compareMaps="-DcompareMaps=true";;
+		 		 -updateSite) updateSite="-DupdateSite=$2";shift;;
+		 		 -sign) sign="-Dsign=true";shift;;
+                                 -upload) upload=true;;
+		 		 -*)
+		 		 		 echo >&2 $usage
+		 		 		 exit 1;;
+		 		 *) break;;		 # terminate while loop
+		 esac
+		 shift
+done
+
+# After the above the build type is left in $1.
+buildType=$1
+echo "======[buildType]: $buildType " >> $USER.log
+
+# Set default buildId and buildLabel if none explicitly set
+if [ "$buildId" = "" ]
+then
+		 #buildId=$buildType$builddate-$buildtime
+		 buildId=v$builddate-$buildtime
+fi
+
+if [ "$buildLabel" = "" ]
+then
+		 buildLabel=$buildId
+fi
+echo "======[buildId]: $buildId " >> $USER.log
+
+#Set the tag to HEAD for Nightly builds
+if [ "$buildType" = "N" ]
+then
+        tag="-DfetchTag=CVS=HEAD,GIT=master"
+        versionQualifier="-DforceContextQualifier=$buildId"
+fi
+
+echo "======[tag]: $tag" >> $USER.log
+echo "======[versionQualifier]: $versionQualifier" >> $USER.log
+
+# tag for eclipseInternalBuildTools on ottcvs1
+internalToolsTag=$buildProjectTags
+echo "======[internalToolsTag]: $internalToolsTag" >> $USER.log
+
+# tag for exporting org.eclipse.releng.basebuilder
+baseBuilderTag=$buildProjectTags
+echo "======[baseBuilderTag]: $baseBuilderTag" >> $USER.log
+
+# tag for exporting the custom builder
+customBuilderTag=$buildProjectTags
+echo "======[customBuilderTag]: $customBuilderTag" >> $USER.log
+
+#if [ -e $builderDir ]
+#then
+#	 builderDir=$builderDir$timestamp
+#fi
+
+# directory where features and plugins will be compiled
+buildDirectory=$HOME/releng.dtp.192/src
+
+echo "======[buildDirectory]: $buildDirectory" >> $USER.log
+
+mkdir -p $builderDir
+cd $builderDir
+
+#Pull or clone a branch from a repository
+#Usage: pull repositoryURL  branch
+pull() {
+	mkdir -p $builderDir/gitClones
+        pushd $builderDir/gitClones
+        directory=$(basename $1 .git)
+        if [ ! -d $directory ]; then
+                echo git clone $1
+                git clone $1
+        fi
+        popd
+        pushd $builderDir/gitClones/$directory
+        echo git checkout $2
+        git checkout $2
+	echo git pull
+        git pull
+        popd
+}
+
+if [ "$buildType" == "N" -o "$noAutoTag" ]; then
+	echo "Skipping auto plugins tagging for nightly build or -noAutoTag build"
+else
+	pushd $builderDir
+
+	#remove comments
+	rm -f repos-clean.txt clones.txt
+	GitRoot=ssh://xgu@git.eclipse.org/gitroot/datatools
+	echo "$GitRoot/org.eclipse.datatools.build.git $BranchName" > repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.connectivity.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.doc.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.general.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.hsqldb.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.ibm.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.ingres.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.msft.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.mysql.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.oda.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.oracle.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.postgresql.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.sap.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.sqlite.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.enablement.sybase.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.incubator.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.modelbase.git $BranchName" >> repos-clean.txt
+	echo "$GitRoot/org.eclipse.datatools.sqltools.git $BranchName" >> repos-clean.txt
+	
+	#clone or pull each repository and checkout the appropriate branch
+	while read line; do
+        	#each line is of the form <repository> <branch>
+        	set -- $line
+        	pull $1 $2
+        	echo $1 | sed 's/ssh:.*@git.eclipse.org/git:\/\/git.eclipse.org/g' >> clones.txt
+	done < repos-clean.txt
+	
+	cat clones.txt| xargs /bin/bash git-map.sh $builderDir/gitClones \
+        $builderDir/gitClones > maps.txt
+		
+	#Trim out lines that don't require execution
+	grep -v ^OK maps.txt | grep -v ^Executed >run.txt
+	if ( cat run.txt | grep sed ); then
+		/bin/bash run.txt
+                mkdir -p $builderDir/report
+                cp report.txt $builderDir/report/report$buildId.txt
+	elif [ "$ForceAutoTag" == "true" ]; then
+		echo "Continue to build even if no bundles changed for -ForceAutoTag build"
+	else
+		echo "No change detected. 1.9.2 Nightly Build ($buildId) is canceled"
+                exit
+	fi
+	
+	popd
+fi
+
+mkdir -p $postingDirectory/$buildLabel
+chmod -R 755 $builderDir
+
+#default value of the bootclasspath attribute used in ant javac calls.  
+bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jce.jar"
+#bootclasspath="/usr/local/j2sdk1.4.2_13/jre/lib/rt.jar:/usr/local/j2sdk1.4.2_13/jre/lib/jsse.jar"
+bootclasspath_15="/usr/local/jdk1.5.0_02/jre/lib/rt.jar:/usr/local/jdk1.5.0_02/jre/lib/jce.jar"
+bootclasspath_16="/usr/local/jdk1.6.0/jre/lib/rt.jar:/usr/local/jdk1.6.0/jre/lib/jsse.jar"
+jvm15_home="/usr/local/jdk1.5.0_02"
+
+cd $HOME/releng.dtp.192/org.eclipse.datatools.releng.builder
+
+echo buildId=$buildId >> monitor.properties 
+echo timestamp=$timestamp >> monitor.properties 
+echo buildLabel=$buildLabel >> monitor.properties 
+echo currentDay=$builddate >> monitor.properties
+echo recipients=$recipients >> monitor.properties
+echo sender=$sender >> monitor.properties
+echo log=$postingDirectory/$buildLabel/index.php >> monitor.properties
+
+#the base command used to run AntRunner headless
+antRunner="/usr/local/jdk1.5.0_09/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
+#antRunner="/usr/local/j2sdk1.4.2_13/bin/java -Xmx500m -jar ../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar -Dosgi.os=linux -Dosgi.ws=gtk -Dosgi.arch=ppc -application org.eclipse.ant.core.antRunner"
+
+echo "==========[antRunner]: $antRunner" >> $USER.log
+
+#$HOME/releng.dtp.192/BIRTBuilder/replaceBuildInfo.sh $buildinfoDate $buildinfounivDate
+
+#clean drop directories
+
+#full command with args
+#buildId=v20110808-1451
+echo $tagMaps >> $USER.log
+echo $compareMaps >> $USER.log
+
+#cp $HOME/releng.dtp.192/dtpURLmonitor.properties $HOME/releng.260/src/
+
+buildCommand="$antRunner -q -buildfile buildAll.xml $mail $testBuild $compareMaps \
+-DmapVersionTag=$mapVersionTag -DpostingDirectory=$postingDirectory \
+-Dbootclasspath=$bootclasspath_15 -DbuildType=$buildType -D$buildType=true \
+-DbuildId=$buildId -Dbuildid=$buildId -DbuildLabel=$buildId -Dtimestamp=$timestamp $skipPerf $skipTest $tagMaps $noSign \
+-DJ2SE-1.5=$bootclasspath_15 -DJavaSE-1.6=$bootclasspath_16 -DlogExtension=.xml $javadoc $updateSite $sign \
+-Djava15-home=$bootclasspath_15 -DbuildDirectory=$HOME/releng.dtp.192/src \
+-DbaseLocation=$HOME/releng.dtp.192/baseLocation -Dwtp.home=$HOME/releng.dtp.192/baseLocation \
+-DgroupConfiguration=true -DjavacVerbose=true -DjavacFailOnError=false \
+-Dbasebuilder=$HOME/releng.dtp.192/org.eclipse.releng.basebuilder  \
+-Djvm15_home=$jvm15_home  -DmapTag.properties=$HOME/releng.dtp.192/org.eclipse.datatools.releng.builder/mapTag.properties \
+-Dbuild.date=$builddate -Dpackage.version=1.9.2RC1-$timestamp \
+-DmapGitRoot=ssh://xgu@git.eclipse.org/gitroot/datatools \
+-DmapVersionTag=$BranchName -DBranchVersion=1.9.2 -DjavacTarget=1.5 -DjavacSource=1.5 \
+-Dusername.sign=slee -Dpassword.sign=Actuate# -Dhostname.sign=build.eclipse.org -Dhome.dir=/home/data/users/slee -Dsign.dir=/home/data/httpd/download-staging.priv/birt"
+
+#skipPreBuild
+
+#capture command used to run the build
+echo $buildCommand>command.txt
+
+#run the build
+$buildCommand >> $USER.log
+#retCode=$?
+#
+#if [ $retCode != 0 ]
+#then
+#        echo "Build failed (error code $retCode)."
+#        exit -1
+#fi
+
+#clean up
+#rm -rf $builderDir
+rm -rf $HOME/releng.dtp.192/src/$buildId
+#cp -f $HOME/releng.dtp.192/src/directory.txt last_directory.txt
+
diff --git a/plugins/org.eclipse.datatools.releng.builder/git-map.sh b/plugins/org.eclipse.datatools.releng.builder/git-map.sh
new file mode 100755
index 0000000..57b21ce
--- /dev/null
+++ b/plugins/org.eclipse.datatools.releng.builder/git-map.sh
@@ -0,0 +1,124 @@
+#!/bin/bash 
+#
+#
+# example usage - you must have your repos checked out on the branch you
+# expect to tag.
+#
+# USAGE: repoRoot relengRoot repoURL [repoURL]*
+#    repoRoot   - absolute path to a folder containing cloned git repositories
+#    relengRoot - absolute path to releng project containing map files
+#    repoURL    - git repository urls to tag, must match entries in the map files
+# EXAMPLE: git-map.sh  \
+#   /opt/pwebster/git/eclipse \
+#   /opt/pwebster/workspaces/gitMigration/org.eclipse.releng \
+#   git://git.eclipse.org/gitroot/platform/eclipse.platform.runtime.git \
+#   git://git.eclipse.org/gitroot/platform/eclipse.platform.ui.git >maps.txt
+# examine the file
+# grep -v ^OK maps.txt >run.txt
+# /bin/bash run.txt
+#
+
+PLATFORM=$( uname -s )
+
+get_repo_tag () {
+	REPO=$1
+	REPO_DIR=$( basename $REPO .git )
+	cd $ROOT/$REPO_DIR
+	REPO_COMMIT=$( git rev-list -1 HEAD  )
+	NEW_DATE=$( git log -1 --format="%ci" "$REPO_COMMIT" )
+	if [ "$PLATFORM" == "Darwin" ]; then
+		echo v$( date -u -j -f "%s" "$NEW_DATE" "+%Y%m%d-%H%M" )
+	else
+		echo v$( date --date="$NEW_DATE"  "+%Y%m%d%H%M" )
+	fi
+}
+
+tag_repo_commit () {
+	REPO=$1
+	REPO_DIR=$( basename $REPO .git )
+	NEW_TAG=$( get_repo_tag $REPO )
+	cd $ROOT/$REPO_DIR
+	REPO_COMMIT=$( git rev-list -1 HEAD  )
+	if ! ( git log -1  --format="%d" "$REPO_COMMIT" | grep "[ (]$NEW_TAG[,)]" >/dev/null); then
+		OLD_TAG=$( git log --pretty=oneline --decorate | grep "[ (][vI][0-9]" \
+			| head -1 | sed 's/^[^(]* (.*\([vI][0-9][0-9][0-9][0-9]\)/\1/g'   | sed 's/[,)].*$//g' ) 
+		SUBMISSION_ARGS="$SUBMISSION_ARGS $REPO $OLD_TAG $NEW_TAG"
+		echo "#OK Executed: cd $ROOT/$REPO_DIR \; git tag \"$NEW_TAG\" \"$REPO_COMMIT\""
+		cd $ROOT/$REPO_DIR ; git tag "$NEW_TAG" "$REPO_COMMIT"
+	fi
+}
+
+update_map () {
+	#echo update_map "$@"
+	REPO=$1
+	REPO_DIR=$( basename $REPO .git )
+	MAP=$2
+	cd $ROOT/$REPO_DIR
+	grep "repo=${REPO}," "$MAP" >/tmp/maplines_$$.txt
+	dos2unix /tmp/maplines_$$.txt
+	if [ ! -s /tmp/maplines_$$.txt ]; then
+		return
+	fi
+	while read LINE; do
+		LINE_START=$( echo $LINE | sed 's/^\([^=]*\)=.*$/\1/g' )
+		PROJ_PATH=$( echo $LINE | sed 's/^.*path=//g' )
+		CURRENT_TAG=$( echo $LINE | sed 's/.*tag=\([^,]*\),.*$/\1/g' )
+		LAST_COMMIT=$( git rev-list -1 HEAD -- "$PROJ_PATH" )
+        if [ -z "$LAST_COMMIT" ]; then
+            echo "#SKIPPING $LINE_START, no commits for $PROJ_PATH"
+            continue
+        fi
+		
+		if ! ( git tag --contains $LAST_COMMIT | grep $CURRENT_TAG >/dev/null ); then
+			NEW_DATE=$( git log -1 --format="%ci" "$LAST_COMMIT" )
+			if [ "$PLATFORM" == "Darwin" ]; then
+				NEW_TAG=v$( date -u -j -f "%s" "$NEW_DATE" "+%Y%m%d-%H%M" )
+			else
+				NEW_TAG=v$( date --date="$NEW_DATE"  "+%Y%m%d%H%M" )
+			fi
+			
+			if ! ( git log -1  --format="%d" "$LAST_COMMIT" | grep "[ (]$NEW_TAG[,)]" >/dev/null); then
+				SUBMISSION_ARGS="$SUBMISSION_ARGS $REPO $CURRENT_TAG $NEW_TAG"
+				echo "#OK Executed: cd $ROOT/$REPO_DIR \; git tag \"$NEW_TAG\" \"$LAST_COMMIT\""
+				cd $ROOT/$REPO_DIR ; git tag "$NEW_TAG" "$LAST_COMMIT"
+			fi
+			echo sed "'s/$LINE_START=GIT,tag=$CURRENT_TAG/$LINE_START=GIT,tag=$NEW_TAG/g'" $MAP \>/tmp/t1_$$.txt \; mv /tmp/t1_$$.txt $MAP
+			#echo \( cd $ROOT/$REPO_DIR \; git commit -a -m \"Update map file for "$LINE_START" by auto tag script\" \)
+		else
+			echo OK $LINE_START $CURRENT_TAG 
+		fi
+	done </tmp/maplines_$$.txt
+	rm -f /tmp/maplines_$$.txt
+	echo \( cd $ROOT/$REPO_DIR \; git commit -a -m \"Update map file for "$REPO_DIR" repository by auto tag script\" \)
+	echo \( cd $ROOT/$REPO_DIR \; git push \; git push --tags \)
+}
+
+
+STATUS=OK
+STATUS_MSG=""
+LATEST_SUBMISSION=""
+SUBMISSION_ARGS=""
+
+if [ $# -lt 3 ]; then
+  echo "USAGE: $0 repoRoot relengRoot repoURL [repoURL]*"
+  exit 1
+fi
+
+
+ROOT=$1; shift
+RELENG=$1; shift
+REPOS="$@"
+
+
+for REPO in $REPOS; do
+	cd $ROOT
+	#tag_repo_commit $REPO
+	MAPS=$( find $RELENG -name "*.map" -exec grep -l "repo=${REPO}," {} \; )
+	if [ ! -z "$MAPS" ]; then
+		for MAP in $MAPS; do
+			update_map $REPO $MAP
+		done
+	fi
+done
+
+echo "/bin/bash git-submission.sh $ROOT $SUBMISSION_ARGS > report.txt"
diff --git a/plugins/org.eclipse.datatools.releng.builder/git-submission.sh b/plugins/org.eclipse.datatools.releng.builder/git-submission.sh
new file mode 100755
index 0000000..af7db69
--- /dev/null
+++ b/plugins/org.eclipse.datatools.releng.builder/git-submission.sh
@@ -0,0 +1,45 @@
+#!/bin/bash
+#
+# When the map file has been updated, this can be used to generate
+# the releng build submission report
+# USAGE: git-submission.sh repoRoot repoURL last_tag build_tag [repoURL...] >report.txt
+#
+
+
+ROOT=$1; shift
+rm -f /tmp/proj_changed_$$.txt /tmp/bug_list_$$.txt
+
+while [ $# -gt 0 ]; do
+	REPO="$1"; shift
+	REPO_DIR=$( basename $REPO .git )
+	LAST_TAG="$1"; shift
+echo "LAST_TAG: $LAST_TAG"
+	BUILD_TAG="$1"; shift
+echo "BUILD_TAG: $BUILD_TAG"
+	cd $ROOT/$REPO_DIR
+	git diff --name-only ${LAST_TAG} ${BUILD_TAG} | cut -f2 -d/ | sort -u >>/tmp/proj_changed_$$.txt
+	 
+	
+	git log --first-parent ${LAST_TAG}..${BUILD_TAG} \
+		| grep '\[[^0-9]*[0-9][0-9][0-9][0-9][0-9]*[^0-9]'  \
+		| sed 's/.*\[[^0-9]*\([0-9][0-9][0-9][0-9][0-9]*\)[^0-9].*$/\1/g' >>/tmp/bug_list_$$.txt
+done
+
+rm -f /tmp/bug_info_$$.txt
+
+for BUG in $( cat /tmp/bug_list_$$.txt | sort -n -u ); do
+	BUGT2=/tmp/buginfo_${BUG}_$$.txt
+	curl -k https://bugs.eclipse.org/bugs/show_bug.cgi?id=${BUG}\&ctype=xml >$BUGT2 2>/dev/null
+	TITLE=$( grep short_desc $BUGT2 | sed 's/^.*<short_desc.//g' | sed 's/<\/short_desc.*$//g' )
+    STATUS=$( grep bug_status $BUGT2 | sed 's/^.*<bug_status.//g' | sed 's/<\/bug_status.*$//g' )
+    if [ RESOLVED = "$STATUS" -o VERIFIED = "$STATUS" ]; then
+        STATUS=$( grep '<resolution>' $BUGT2 | sed 's/^.*<resolution.//g' | sed 's/<\/resolution.*$//g' )
+    fi
+    echo + Bug $BUG - $TITLE \(${STATUS}\) >>/tmp/bug_info_$$.txt
+done
+
+echo The build contains the following changes:
+cat /tmp/bug_info_$$.txt
+echo ""
+echo The following projects have changed:
+cat /tmp/proj_changed_$$.txt | sort -u