mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-20 06:35:50 +02:00
Fix S-builds split up due to incorrect timestamps
This commit is contained in:
parent
1d0a39548b
commit
f1dd251a30
5 changed files with 95 additions and 79 deletions
|
@ -70,7 +70,9 @@ $publishDirectory = "$working/publish";
|
||||||
$tag = ask("Enter tag to fetch from CVS", "HEAD");
|
$tag = ask("Enter tag to fetch from CVS", "HEAD");
|
||||||
$buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P");
|
$buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P");
|
||||||
($sec, $minute, $hour, $mday, $mon, $year) = localtime();
|
($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 = $buildType . $timeStamp;
|
||||||
$buildId = ask("Enter the build id", $buildType . $timeStamp);
|
$buildId = ask("Enter the build id", $buildType . $timeStamp);
|
||||||
|
|
||||||
|
@ -85,6 +87,8 @@ $incantation .= "-DbaseLocation=${eclipse} ";
|
||||||
$incantation .= "-DbuildType=${buildType} ";
|
$incantation .= "-DbuildType=${buildType} ";
|
||||||
$incantation .= "-DbuildId=${buildId} ";
|
$incantation .= "-DbuildId=${buildId} ";
|
||||||
$incantation .= "-DmapVersionTag=${tag} ";
|
$incantation .= "-DmapVersionTag=${tag} ";
|
||||||
|
$incantation .= "-Dmydstamp=${mydstamp} ";
|
||||||
|
$incantation .= "-Dmytstamp=${mytstamp} ";
|
||||||
if ($buildType =~ "N") {
|
if ($buildType =~ "N") {
|
||||||
$incantation .= "-DforceContextQualifier=${buildId} ";
|
$incantation .= "-DforceContextQualifier=${buildId} ";
|
||||||
$incantation .= "-DfetchTag=HEAD ";
|
$incantation .= "-DfetchTag=HEAD ";
|
||||||
|
|
|
@ -1,75 +1,79 @@
|
||||||
#!/usr/bin/ruby
|
#!/usr/bin/ruby
|
||||||
# Build script for Remote System Explorer
|
# Build script for Remote System Explorer
|
||||||
# Author: Dave Dykstal, Kushal Munir
|
# Author: Dave Dykstal, Kushal Munir
|
||||||
# Prerequisites:
|
# Prerequisites:
|
||||||
# written in ruby
|
# written in ruby
|
||||||
# java and cvs have to be in the path
|
# java and cvs have to be in the path
|
||||||
|
|
||||||
require "ftools"
|
require "ftools"
|
||||||
|
|
||||||
def ask(question, default)
|
def ask(question, default)
|
||||||
message = "#{question} (default is #{default}): "
|
message = "#{question} (default is #{default}): "
|
||||||
STDERR.print message
|
STDERR.print message
|
||||||
answer = readline().strip
|
answer = readline().strip
|
||||||
answer = answer.empty? ? default : answer
|
answer = answer.empty? ? default : answer
|
||||||
return answer
|
return answer
|
||||||
end
|
end
|
||||||
|
|
||||||
# "eclipse" is the location of the basic PDE and plugins to compile against
|
# "eclipse" is the location of the basic PDE and plugins to compile against
|
||||||
# This should include the org.eclipse.pde.build project
|
# This should include the org.eclipse.pde.build project
|
||||||
eclipse = "../eclipse"
|
eclipse = "../eclipse"
|
||||||
|
|
||||||
# "basebuilder" is the location of the Eclipse Releng basebuilder
|
# "basebuilder" is the location of the Eclipse Releng basebuilder
|
||||||
# This can be set to #{eclipse}
|
# This can be set to #{eclipse}
|
||||||
basebuilder = "../org.eclipse.releng.basebuilder"
|
basebuilder = "../org.eclipse.releng.basebuilder"
|
||||||
|
|
||||||
# "builder" is the location of the custom build scripts customTargets.xml and build.properties
|
# "builder" is the location of the custom build scripts customTargets.xml and build.properties
|
||||||
# (i.e. the contents of org.eclipse.rse.build)
|
# (i.e. the contents of org.eclipse.rse.build)
|
||||||
builder = "."
|
builder = "."
|
||||||
|
|
||||||
# "working" is where the build is actually done, does not need to exist
|
# "working" is where the build is actually done, does not need to exist
|
||||||
working = "../working"
|
working = "../working"
|
||||||
|
|
||||||
# make these absolute paths
|
# make these absolute paths
|
||||||
eclipse = File.expand_path(eclipse)
|
eclipse = File.expand_path(eclipse)
|
||||||
basebuilder = File.expand_path(basebuilder)
|
basebuilder = File.expand_path(basebuilder)
|
||||||
builder = File.expand_path(builder)
|
builder = File.expand_path(builder)
|
||||||
working = File.expand_path(working)
|
working = File.expand_path(working)
|
||||||
|
|
||||||
# Find the base build scripts: genericTargets.xml and build.xml
|
# Find the base build scripts: genericTargets.xml and build.xml
|
||||||
candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
|
candidates = Dir["#{basebuilder}/plugins/org.eclipse.pde.build*"]
|
||||||
if (candidates.size == 0) then
|
if (candidates.size == 0) then
|
||||||
raise("PDE Build was not found.")
|
raise("PDE Build was not found.")
|
||||||
end
|
end
|
||||||
if (candidates.size > 1) then
|
if (candidates.size > 1) then
|
||||||
raise("Too many versions of PDE Build were found.")
|
raise("Too many versions of PDE Build were found.")
|
||||||
end
|
end
|
||||||
pdeBuild = candidates[0]
|
pdeBuild = candidates[0]
|
||||||
|
|
||||||
buildDirectory = "#{working}/build"
|
buildDirectory = "#{working}/build"
|
||||||
packageDirectory = "#{working}/package"
|
packageDirectory = "#{working}/package"
|
||||||
publishDirectory = "#{working}/publish"
|
publishDirectory = "#{working}/publish"
|
||||||
|
|
||||||
tag = ask("Enter tag to fetch from CVS", "HEAD")
|
tag = ask("Enter tag to fetch from CVS", "HEAD")
|
||||||
buildType = ask("Enter build type (P=Personal, N=Nightly, I=Integration, S=Stable)", "P")
|
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"))
|
mydstamp = Time.now.strftime("%Y%m%d")
|
||||||
|
mytstamp = Time.now.strftime("%H%M")
|
||||||
command = "java -cp #{basebuilder}/startup.jar org.eclipse.core.launcher.Main "
|
buildId = ask("Enter the build id", buildType + mydstamp + "-" + mydstamp)
|
||||||
command += "-application org.eclipse.ant.core.antRunner "
|
|
||||||
command += "-buildfile #{pdeBuild}/scripts/build.xml "
|
command = "java -cp #{basebuilder}/startup.jar org.eclipse.core.launcher.Main "
|
||||||
command += "-DbuildDirectory=#{buildDirectory} "
|
command += "-application org.eclipse.ant.core.antRunner "
|
||||||
command += "-DpackageDirectory=#{packageDirectory} "
|
command += "-buildfile #{pdeBuild}/scripts/build.xml "
|
||||||
command += "-DpublishDirectory=#{publishDirectory} "
|
command += "-DbuildDirectory=#{buildDirectory} "
|
||||||
command += "-Dbuilder=#{builder} "
|
command += "-DpackageDirectory=#{packageDirectory} "
|
||||||
command += "-DbaseLocation=#{eclipse} "
|
command += "-DpublishDirectory=#{publishDirectory} "
|
||||||
command += "-DbuildType=#{buildType} "
|
command += "-Dbuilder=#{builder} "
|
||||||
command += "-DbuildId=#{buildId} "
|
command += "-DbaseLocation=#{eclipse} "
|
||||||
command += "-DmapVersionTag=#{tag} "
|
command += "-DbuildType=#{buildType} "
|
||||||
if ("#{buildType}" == "N") then
|
command += "-DbuildId=#{buildId} "
|
||||||
command += "-DforceContextQualifier=#{buildId} "
|
command += "-DmapVersionTag=#{tag} "
|
||||||
command += "-DfetchTag=HEAD "
|
command += "-Dmydstamp=#{mydstamp} "
|
||||||
end
|
command += "-Dmytstamp=#{mytstamp} "
|
||||||
|
if ("#{buildType}" == "N") then
|
||||||
puts(command)
|
command += "-DforceContextQualifier=#{buildId} "
|
||||||
|
command += "-DfetchTag=HEAD "
|
||||||
|
end
|
||||||
|
|
||||||
|
puts(command)
|
||||||
|
|
||||||
system(command)
|
system(command)
|
|
@ -186,7 +186,7 @@
|
||||||
<echo message="buildName = ${buildName}"/>
|
<echo message="buildName = ${buildName}"/>
|
||||||
<echo message="buildType = ${buildType}"/>
|
<echo message="buildType = ${buildType}"/>
|
||||||
<echo message="buildLabel = ${buildLabel}"/>
|
<echo message="buildLabel = ${buildLabel}"/>
|
||||||
<echo message="tstamp = ${DSTAMP}-${TSTAMP} of ${dateLong}"/>
|
<echo message="tstamp = ${mydstamp}-${mytstamp} of ${dateLong}"/>
|
||||||
<echo message="archivePrefix = ${archivePrefix}"/>
|
<echo message="archivePrefix = ${archivePrefix}"/>
|
||||||
<echo message="collectingFolder = ${collectingFolder}"/>
|
<echo message="collectingFolder = ${collectingFolder}"/>
|
||||||
</target>
|
</target>
|
||||||
|
@ -205,7 +205,7 @@
|
||||||
<condition property="doCopy">
|
<condition property="doCopy">
|
||||||
<not><equals arg1="${publishDirectory}" arg2=""/></not>
|
<not><equals arg1="${publishDirectory}" arg2=""/></not>
|
||||||
</condition>
|
</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"/>
|
<equals arg1="${buildType}" arg2="S"/>
|
||||||
</condition>
|
</condition>
|
||||||
<property name="buildUpdateSitePath" value="${packageDirectory}/${dropDir}/updates"/>
|
<property name="buildUpdateSitePath" value="${packageDirectory}/${dropDir}/updates"/>
|
||||||
|
|
|
@ -36,7 +36,9 @@ packageDirectory="${working}/package"
|
||||||
|
|
||||||
tag="HEAD"
|
tag="HEAD"
|
||||||
buildType="N"
|
buildType="N"
|
||||||
timestamp=`date +'%Y%m%d-%H%M'`
|
mydstamp=`date +'%Y%m%d'`
|
||||||
|
mytstamp=`date +'%H%M'`
|
||||||
|
timestamp="${mydstamp}-${mytstamp}"
|
||||||
buildId="${buildType}${timestamp}"
|
buildId="${buildType}${timestamp}"
|
||||||
rm -rf "${buildDirectory}"
|
rm -rf "${buildDirectory}"
|
||||||
|
|
||||||
|
@ -55,6 +57,8 @@ command="$command -DdoPublish=true "
|
||||||
command="$command -DforceContextQualifier=${buildId} "
|
command="$command -DforceContextQualifier=${buildId} "
|
||||||
command="$command -DfetchTag=HEAD "
|
command="$command -DfetchTag=HEAD "
|
||||||
command="$command -DskipFetch "
|
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 -DJ2SE-1.2=../jres/1.2.2/lib/rt.jar "
|
||||||
#command="$command postBuild "
|
#command="$command postBuild "
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,9 @@ packageDirectory="${working}/package"
|
||||||
|
|
||||||
tag="HEAD"
|
tag="HEAD"
|
||||||
buildType="N"
|
buildType="N"
|
||||||
timestamp=`date +'%Y%m%d-%H%M'`
|
mydstamp=`date +'%Y%m%d'`
|
||||||
|
mytstamp=`date +'%H%M'`
|
||||||
|
timestamp="${mydstamp}-${mytstamp}"
|
||||||
buildId="${buildType}${timestamp}"
|
buildId="${buildType}${timestamp}"
|
||||||
rm -rf "${buildDirectory}"
|
rm -rf "${buildDirectory}"
|
||||||
|
|
||||||
|
@ -53,6 +55,8 @@ command="$command -DmapVersionTag=${tag} "
|
||||||
command="$command -DdoPublish=true "
|
command="$command -DdoPublish=true "
|
||||||
command="$command -DforceContextQualifier=${buildId} "
|
command="$command -DforceContextQualifier=${buildId} "
|
||||||
command="$command -DfetchTag=HEAD "
|
command="$command -DfetchTag=HEAD "
|
||||||
|
command="$command -Dmydstamp=${mydstamp} "
|
||||||
|
command="$command -Dmytstamp=${mytstamp} "
|
||||||
#command="$command postBuild "
|
#command="$command postBuild "
|
||||||
|
|
||||||
echo "$command"
|
echo "$command"
|
||||||
|
|
Loading…
Add table
Reference in a new issue