1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-05 08:05:24 +02:00

Fix S-builds split up due to incorrect timestamps

This commit is contained in:
Martin Oberhuber 2006-10-29 22:36:52 +00:00
parent 1d0a39548b
commit f1dd251a30
5 changed files with 95 additions and 79 deletions

View file

@ -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 ";

View file

@ -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)

View file

@ -186,7 +186,7 @@
<echo message="buildName = ${buildName}"/>
<echo message="buildType = ${buildType}"/>
<echo message="buildLabel = ${buildLabel}"/>
<echo message="tstamp = ${DSTAMP}-${TSTAMP} of ${dateLong}"/>
<echo message="tstamp = ${mydstamp}-${mytstamp} of ${dateLong}"/>
<echo message="archivePrefix = ${archivePrefix}"/>
<echo message="collectingFolder = ${collectingFolder}"/>
</target>
@ -205,7 +205,7 @@
<condition property="doCopy">
<not><equals arg1="${publishDirectory}" arg2=""/></not>
</condition>
<condition property="dropDir" value="S-${buildId}-${DSTAMP}${TSTAMP}" else="${buildId}">
<condition property="dropDir" value="S-${buildId}-${mydstamp}${mytstamp}" else="${buildId}">
<equals arg1="${buildType}" arg2="S"/>
</condition>
<property name="buildUpdateSitePath" value="${packageDirectory}/${dropDir}/updates"/>

View file

@ -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 "

View file

@ -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"