From f1dd251a30213c7c5381f904ef691a0da4597b1d Mon Sep 17 00:00:00 2001
From: Martin Oberhuber < martin.oberhuber@windriver.com>
Date: Sun, 29 Oct 2006 22:36:52 +0000
Subject: [PATCH] Fix S-builds split up due to incorrect timestamps
---
releng/org.eclipse.rse.build/build.pl | 6 +-
releng/org.eclipse.rse.build/build.rb | 152 +++++++++---------
.../org.eclipse.rse.build/customTargets.xml | 4 +-
releng/org.eclipse.rse.build/go.sh | 6 +-
releng/org.eclipse.rse.build/nightly.sh | 6 +-
5 files changed, 95 insertions(+), 79 deletions(-)
diff --git a/releng/org.eclipse.rse.build/build.pl b/releng/org.eclipse.rse.build/build.pl
index 21d8c7ae7de..002934fcb36 100644
--- a/releng/org.eclipse.rse.build/build.pl
+++ b/releng/org.eclipse.rse.build/build.pl
@@ -70,7 +70,9 @@ $publishDirectory = "$working/publish";
$tag = ask("Enter tag to fetch from CVS", "HEAD");
$buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P");
($sec, $minute, $hour, $mday, $mon, $year) = localtime();
-$timeStamp = sprintf("%4.4d%2.2d%2.2d-%2.2d%2.2d", $year + 1900, ($mon + 1), $mday, $hour, $minute, $sec);
+$mydstamp = sprintf("%4.4d%2.2d%2.2d", $year + 1900, ($mon + 1), $mday);
+$mytstamp = sprintf("%2.2d%2.2d", $hour, $minute, $sec);
+$timeStamp = "${mydstamp}-${mytstamp}";
$buildId = $buildType . $timeStamp;
$buildId = ask("Enter the build id", $buildType . $timeStamp);
@@ -85,6 +87,8 @@ $incantation .= "-DbaseLocation=${eclipse} ";
$incantation .= "-DbuildType=${buildType} ";
$incantation .= "-DbuildId=${buildId} ";
$incantation .= "-DmapVersionTag=${tag} ";
+$incantation .= "-Dmydstamp=${mydstamp} ";
+$incantation .= "-Dmytstamp=${mytstamp} ";
if ($buildType =~ "N") {
$incantation .= "-DforceContextQualifier=${buildId} ";
$incantation .= "-DfetchTag=HEAD ";
diff --git a/releng/org.eclipse.rse.build/build.rb b/releng/org.eclipse.rse.build/build.rb
index dc418a94ebd..64bc42c3abd 100644
--- a/releng/org.eclipse.rse.build/build.rb
+++ b/releng/org.eclipse.rse.build/build.rb
@@ -1,75 +1,79 @@
-#!/usr/bin/ruby
-# Build script for Remote System Explorer
-# Author: Dave Dykstal, Kushal Munir
-# Prerequisites:
-# written in ruby
-# java and cvs have to be in the path
-
-require "ftools"
-
-def ask(question, default)
- message = "#{question} (default is #{default}): "
- STDERR.print message
- answer = readline().strip
- answer = answer.empty? ? default : answer
- return answer
-end
-
-# "eclipse" is the location of the basic PDE and plugins to compile against
-# This should include the org.eclipse.pde.build project
-eclipse = "../eclipse"
-
-# "basebuilder" is the location of the Eclipse Releng basebuilder
-# This can be set to #{eclipse}
-basebuilder = "../org.eclipse.releng.basebuilder"
-
-# "builder" is the location of the custom build scripts customTargets.xml and build.properties
-# (i.e. the contents of org.eclipse.rse.build)
-builder = "."
-
-# "working" is where the build is actually done, does not need to exist
-working = "../working"
-
-# make these absolute paths
-eclipse = File.expand_path(eclipse)
-basebuilder = File.expand_path(basebuilder)
-builder = File.expand_path(builder)
-working = File.expand_path(working)
-
-# Find the base build scripts: genericTargets.xml and build.xml
-candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
-if (candidates.size == 0) then
- raise("PDE Build was not found.")
-end
-if (candidates.size > 1) then
- raise("Too many versions of PDE Build were found.")
-end
-pdeBuild = candidates[0]
-
-buildDirectory = "#{working}/build"
-packageDirectory = "#{working}/package"
-publishDirectory = "#{working}/publish"
-
-tag = ask("Enter tag to fetch from CVS", "HEAD")
-buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P")
-buildId = ask("Enter the build id", buildType + Time.now.strftime("%Y%m%d-%H%M"))
-
-command = "java -cp #{basebuilder}/startup.jar org.eclipse.core.launcher.Main "
-command += "-application org.eclipse.ant.core.antRunner "
-command += "-buildfile #{pdeBuild}/scripts/build.xml "
-command += "-DbuildDirectory=#{buildDirectory} "
-command += "-DpackageDirectory=#{packageDirectory} "
-command += "-DpublishDirectory=#{publishDirectory} "
-command += "-Dbuilder=#{builder} "
-command += "-DbaseLocation=#{eclipse} "
-command += "-DbuildType=#{buildType} "
-command += "-DbuildId=#{buildId} "
-command += "-DmapVersionTag=#{tag} "
-if ("#{buildType}" == "N") then
- command += "-DforceContextQualifier=#{buildId} "
- command += "-DfetchTag=HEAD "
-end
-
-puts(command)
-
+#!/usr/bin/ruby
+# Build script for Remote System Explorer
+# Author: Dave Dykstal, Kushal Munir
+# Prerequisites:
+# written in ruby
+# java and cvs have to be in the path
+
+require "ftools"
+
+def ask(question, default)
+ message = "#{question} (default is #{default}): "
+ STDERR.print message
+ answer = readline().strip
+ answer = answer.empty? ? default : answer
+ return answer
+end
+
+# "eclipse" is the location of the basic PDE and plugins to compile against
+# This should include the org.eclipse.pde.build project
+eclipse = "../eclipse"
+
+# "basebuilder" is the location of the Eclipse Releng basebuilder
+# This can be set to #{eclipse}
+basebuilder = "../org.eclipse.releng.basebuilder"
+
+# "builder" is the location of the custom build scripts customTargets.xml and build.properties
+# (i.e. the contents of org.eclipse.rse.build)
+builder = "."
+
+# "working" is where the build is actually done, does not need to exist
+working = "../working"
+
+# make these absolute paths
+eclipse = File.expand_path(eclipse)
+basebuilder = File.expand_path(basebuilder)
+builder = File.expand_path(builder)
+working = File.expand_path(working)
+
+# Find the base build scripts: genericTargets.xml and build.xml
+candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
+if (candidates.size == 0) then
+ raise("PDE Build was not found.")
+end
+if (candidates.size > 1) then
+ raise("Too many versions of PDE Build were found.")
+end
+pdeBuild = candidates[0]
+
+buildDirectory = "#{working}/build"
+packageDirectory = "#{working}/package"
+publishDirectory = "#{working}/publish"
+
+tag = ask("Enter tag to fetch from CVS", "HEAD")
+buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P")
+mydstamp = Time.now.strftime("%Y%m%d")
+mytstamp = Time.now.strftime("%H%M")
+buildId = ask("Enter the build id", buildType + mydstamp + "-" + mydstamp)
+
+command = "java -cp #{basebuilder}/startup.jar org.eclipse.core.launcher.Main "
+command += "-application org.eclipse.ant.core.antRunner "
+command += "-buildfile #{pdeBuild}/scripts/build.xml "
+command += "-DbuildDirectory=#{buildDirectory} "
+command += "-DpackageDirectory=#{packageDirectory} "
+command += "-DpublishDirectory=#{publishDirectory} "
+command += "-Dbuilder=#{builder} "
+command += "-DbaseLocation=#{eclipse} "
+command += "-DbuildType=#{buildType} "
+command += "-DbuildId=#{buildId} "
+command += "-DmapVersionTag=#{tag} "
+command += "-Dmydstamp=#{mydstamp} "
+command += "-Dmytstamp=#{mytstamp} "
+if ("#{buildType}" == "N") then
+ command += "-DforceContextQualifier=#{buildId} "
+ command += "-DfetchTag=HEAD "
+end
+
+puts(command)
+
system(command)
\ No newline at end of file
diff --git a/releng/org.eclipse.rse.build/customTargets.xml b/releng/org.eclipse.rse.build/customTargets.xml
index 255c36b9ade..67bbdec6fca 100644
--- a/releng/org.eclipse.rse.build/customTargets.xml
+++ b/releng/org.eclipse.rse.build/customTargets.xml
@@ -186,7 +186,7 @@
-
+
@@ -205,7 +205,7 @@
-
+
diff --git a/releng/org.eclipse.rse.build/go.sh b/releng/org.eclipse.rse.build/go.sh
index 1224290e4ae..cf782ac246a 100755
--- a/releng/org.eclipse.rse.build/go.sh
+++ b/releng/org.eclipse.rse.build/go.sh
@@ -36,7 +36,9 @@ packageDirectory="${working}/package"
tag="HEAD"
buildType="N"
-timestamp=`date +'%Y%m%d-%H%M'`
+mydstamp=`date +'%Y%m%d'`
+mytstamp=`date +'%H%M'`
+timestamp="${mydstamp}-${mytstamp}"
buildId="${buildType}${timestamp}"
rm -rf "${buildDirectory}"
@@ -55,6 +57,8 @@ command="$command -DdoPublish=true "
command="$command -DforceContextQualifier=${buildId} "
command="$command -DfetchTag=HEAD "
command="$command -DskipFetch "
+command="$command -Dmydstamp=${mydstamp} "
+command="$command -Dmytstamp=${mytstamp} "
#command="$command -DJ2SE-1.2=../jres/1.2.2/lib/rt.jar "
#command="$command postBuild "
diff --git a/releng/org.eclipse.rse.build/nightly.sh b/releng/org.eclipse.rse.build/nightly.sh
index e322103bdc3..a3452df53fd 100755
--- a/releng/org.eclipse.rse.build/nightly.sh
+++ b/releng/org.eclipse.rse.build/nightly.sh
@@ -35,7 +35,9 @@ packageDirectory="${working}/package"
tag="HEAD"
buildType="N"
-timestamp=`date +'%Y%m%d-%H%M'`
+mydstamp=`date +'%Y%m%d'`
+mytstamp=`date +'%H%M'`
+timestamp="${mydstamp}-${mytstamp}"
buildId="${buildType}${timestamp}"
rm -rf "${buildDirectory}"
@@ -53,6 +55,8 @@ command="$command -DmapVersionTag=${tag} "
command="$command -DdoPublish=true "
command="$command -DforceContextQualifier=${buildId} "
command="$command -DfetchTag=HEAD "
+command="$command -Dmydstamp=${mydstamp} "
+command="$command -Dmytstamp=${mytstamp} "
#command="$command postBuild "
echo "$command"