Skip to content

Commit 5d9f3e8

Browse files
author
Michael Xia
committed
Merge branch 'release'
2 parents 4bcd4ec + 3a528ef commit 5d9f3e8

File tree

85 files changed

+5015
-214
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+5015
-214
lines changed

Diff for: builders/com.aptana.radrails.build/build.xml

+1
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@
133133
<dirset dir="${buildDirectory}" defaultexcludes="true">
134134
<include name="plugins/*" />
135135
<include name="features/*" />
136+
<exclude name="plugins/com.aptana.ruby.core" />
136137
<exclude name="${topLevelElementType}s/${topLevelElementId}" />
137138
</dirset>
138139
</path>

Diff for: builders/com.aptana.radrails.build/build_local.properties

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ builder.plugin=org.eclipse.pde.build_3.7.0.v20111116-2009
4444
#studio3.p2.repo=/tmp/deploy/studio3
4545
#deploy.dir=/tmp/deploy/studio3-ruby
4646
#git.executable=/usr/local/bin/git
47+
#ruby.executable=ruby
4748

4849
# Common
4950
scs.branch.name=development

Diff for: builders/com.aptana.radrails.build/customTargets.xml

+123
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,129 @@
66
</classpath>
77
</taskdef>
88

9+
<!-- ===================================================================== -->
10+
<!-- Steps to do before generating the build scripts. -->
11+
<!-- ===================================================================== -->
12+
<target name="preGenerate">
13+
<!-- Need to grab version qualifier for scripting plugin, we do that by cloning and checking
14+
last commit of each bundle vs last commit of plugin. This MUST be done before the generateScript target
15+
or else the qualifier we insert into build.properties is ignored. -->
16+
<property name="scripting.plugin.dir" location="${buildDirectory}/plugins/com.aptana.ruby.core"/>
17+
<property name="bundle.timestamps.file" location="${scripting.plugin.dir}/bundle_timestamps.txt"/>
18+
19+
<!-- Find latest commit date between this plugin and every bundle and use that as the build qualifier! -->
20+
<exec executable="/bin/bash" dir="${scripting.plugin.dir}" append="true" output="${bundle.timestamps.file}">
21+
<arg value="-c" />
22+
<arg value="git log --max-count=1 --pretty=format:'%ct' ." />
23+
</exec>
24+
<echo append="true" file="${bundle.timestamps.file}" message="," />
25+
<!-- Grab the pre-defined set of bundles -->
26+
<antcall target="clone-bundle">
27+
<param name="bundle.name" value="ruby.ruble" />
28+
<param name="bundle.dir.name" value="ruby.ruble" />
29+
<param name="bundle.branch" value="${scs.branch.name}" />
30+
</antcall>
31+
<antcall target="clone-bundle">
32+
<param name="bundle.name" value="rails.ruble" />
33+
<param name="bundle.dir.name" value="rails.ruble" />
34+
<param name="bundle.branch" value="${scs.branch.name}" />
35+
</antcall>
36+
<antcall target="clone-bundle">
37+
<param name="bundle.name" value="haml.ruble" />
38+
<param name="bundle.dir.name" value="haml.ruble" />
39+
<param name="bundle.branch" value="${scs.branch.name}" />
40+
</antcall>
41+
<antcall target="clone-bundle">
42+
<param name="bundle.name" value="sass.ruble" />
43+
<param name="bundle.dir.name" value="sass.ruble" />
44+
<param name="bundle.branch" value="${scs.branch.name}" />
45+
</antcall>
46+
<antcall target="clone-bundle">
47+
<param name="bundle.name" value="rspec.ruble" />
48+
<param name="bundle.dir.name" value="rspec.ruble" />
49+
<param name="bundle.branch" value="${scs.branch.name}" />
50+
</antcall>
51+
<antcall target="clone-bundle">
52+
<param name="bundle.name" value="cucumber.ruble" />
53+
<param name="bundle.dir.name" value="cucumber.ruble" />
54+
<param name="bundle.branch" value="${scs.branch.name}" />
55+
</antcall>
56+
<antcall target="clone-bundle">
57+
<param name="bundle.name" value="capistrano.ruble" />
58+
<param name="bundle.dir.name" value="capistrano.ruble" />
59+
<param name="bundle.branch" value="${scs.branch.name}" />
60+
</antcall>
61+
<antcall target="clone-bundle">
62+
<param name="bundle.name" value="heroku.ruble" />
63+
<param name="bundle.dir.name" value="heroku.ruble" />
64+
<param name="bundle.branch" value="${scs.branch.name}" />
65+
</antcall>
66+
<antcall target="clone-bundle">
67+
<param name="bundle.name" value="engineyard.ruble" />
68+
<param name="bundle.dir.name" value="engineyard.ruble" />
69+
<param name="bundle.branch" value="${scs.branch.name}" />
70+
</antcall>
71+
<!-- Now grab the max value of lastmods in bundle_timestamps.txt file and use that as qualifier! -->
72+
<script language="javascript">
73+
<![CDATA[
74+
importPackage(java.lang, java.util, java.io);
75+
76+
// The main method (called from the bottom of the file).
77+
function main() {
78+
var basedir = project.getProperty("scripting.plugin.dir");
79+
80+
var timestamps = new File(basedir, "bundle_timestamps.txt");
81+
var reader = new BufferedReader(new FileReader(timestamps));
82+
var line = reader.readLine();
83+
System.out.println(line);
84+
reader.close();
85+
var max = 0;
86+
var numbers = line.split(",");
87+
for (var i = 0; i < numbers.length; i++) {
88+
new_number = parseInt(numbers[i]);
89+
if (new_number > max)
90+
{
91+
max = new_number;
92+
}
93+
}
94+
System.out.println("Max timestamp of scripting plugin and bundles: " + max);
95+
// Write the max number into the qualifier!
96+
var writer = new FileWriter(new File(basedir, "build.properties"), true);
97+
writer.write("qualifier = " + max + "\n");
98+
writer.close();
99+
}
100+
101+
main();
102+
]]>
103+
</script>
104+
</target>
105+
106+
<target name="clone-bundle">
107+
<delete dir="${scripting.plugin.dir}/bundles/${bundle.dir.name}" failonerror="true" />
108+
<echo message="git clone git://github.com/aptana/${bundle.name}.git ${bundle.dir.name}">
109+
</echo>
110+
<exec executable="/bin/bash" dir="${scripting.plugin.dir}/bundles" failonerror="true">
111+
<arg value="-c" />
112+
<arg value="git clone git://github.com/aptana/${bundle.name}.git ${bundle.dir.name}" />
113+
</exec>
114+
<!-- Checkout the specified branch -->
115+
<echo message="git checkout ${bundle.branch}">
116+
</echo>
117+
<exec executable="/bin/bash" dir="${scripting.plugin.dir}/bundles/${bundle.dir.name}" failonerror="true">
118+
<arg value="-c" />
119+
<arg value="git checkout ${bundle.branch}" />
120+
</exec>
121+
<!-- Grab lastmod and append it to file containing all of the lastmods for each packaged ruble -->
122+
<exec executable="/bin/bash" dir="${scripting.plugin.dir}/bundles/${bundle.dir.name}" append="true" output="${bundle.timestamps.file}" failonerror="true">
123+
<arg value="-c" />
124+
<arg value="git log --max-count=1 --pretty=format:'%ct' ." />
125+
</exec>
126+
127+
<echo append="true" file="${bundle.timestamps.file}" message="," />
128+
<!-- Now remove the .git subdirectory -->
129+
<delete dir="${scripting.plugin.dir}/bundles/${bundle.dir.name}/.git" quiet="true" />
130+
</target>
131+
9132
<!-- ===================================================================== -->
10133
<!-- Steps to do before the repositories are being processed -->
11134
<!-- ===================================================================== -->
Binary file not shown.

Diff for: builders/com.aptana.radrails.tests.build/build.xml

+16-24
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@
1313
</description>
1414

1515
<property file="build_local.properties" />
16+
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
17+
<classpath>
18+
<pathelement location="${basedir}/ant-contrib/ant-contrib.jar" />
19+
</classpath>
20+
</taskdef>
1621

1722
<!-- Set up EMMA location and instrumentation path -->
1823
<path id="emma.lib">
@@ -77,19 +82,9 @@
7782
<delete dir="${coverageDirectory}" failonerror="false" />
7883
<delete dir="${testResultsDirectory}" failonerror="false" />
7984
<delete dir="${buildDirectory}/${buildLabel}" failonerror="false" />
80-
<java jar="${baseLocation}/plugins/${launcher.plugin}.jar" fork="true" failonerror="false">
81-
<arg line="-application org.eclipse.ant.core.antRunner -buildfile ${baseLocation}/plugins/${builder.plugin}/scripts/productBuild/productBuild.xml -Dbuilder=${basedir} -nosplash clean" />
82-
</java>
8385
<delete dir="${baseLocation}" />
8486
<delete dir="${buildDirectory}/features/org.eclipse.pde.build.container.feature" failonerror="false" />
85-
<delete dir="${p2.repo.dir}" failonerror="false" />
86-
<!-- Do a git clean of the build directory -->
87-
<exec executable="/bin/bash" dir="${buildDirectory}">
88-
<arg value="-c" />
89-
<arg value="${git.executable} clean -f -d -x" />
90-
</exec>
9187
<delete file="build.properties" failonerror="false" />
92-
<delete dir="${buildDirectory}/eclipse" failonerror="false" />
9388
</target>
9489

9590
<!-- - - - - - - - - - - - - - - - - -
@@ -111,12 +106,8 @@
111106
<include name="**/*" />
112107
</fileset>
113108
</copy>
114-
<antcall target="run.director">
115-
<param name="p2.installIU" value="com.aptana.feature.feature.group,com.aptana.studio.tests.feature.group,org.radrails.rails.feature.group,com.windowtester.runtime.feature.group" />
116-
<param name="p2.repo" value="${studio3.p2.repo},${studio3.test.p2.repo},${radrails.p2.repo},${windowtester.p2.repo}" />
117-
</antcall>
118109
</target>
119-
110+
120111
<!-- - - - - - - - - - - - - - - - - -
121112
target: wipe.plugins
122113
- - - - - - - - - - - - - - - - - -->
@@ -161,16 +152,14 @@
161152
</java>
162153
</target>
163154

164-
<target name="-pre-test" depends="build" description="Install test features and do pre-test setup.">
165-
<!-- Unzip Eclipse Testing Framework -->
166-
<unzip src="eclipse-test-framework-3.6.zip" dest="${baseLocation}/test-framework" />
167-
168-
<!-- Install the test feature we just built and eclipse testing framework -->
155+
<target name="-pre-test" description="Install test features and do pre-test setup.">
156+
<!-- Unzip Eclipse Testing Framework and... -->
157+
<unzip src="eclipse-test-framework-3.6.zip" dest="${baseLocation}/dropins" />
158+
<!-- Install the test feature we just built along with eclipse test framework -->
169159
<antcall target="run.director">
170-
<param name="p2.installIU" value="${topLevelElementId}.feature.group,org.eclipse.test.feature.group" />
171-
<param name="p2.repo" value="file:${p2.repo.dir},file:${baseLocation}/test-framework/eclipse" />
160+
<param name="p2.installIU" value="com.aptana.feature.feature.group,com.windowtester.runtime.feature.group,org.radrails.rails.feature.group,com.aptana.studio.tests.feature.group,${topLevelElementId}.feature.group" />
161+
<param name="p2.repo" value="${studio3.p2.repo},${windowtester.p2.repo},${radrails.p2.repo},${studio3.test.p2.repo},file:${deploy.dir}" />
172162
</antcall>
173-
174163
<!-- Modify the plugin_custimization.ini to set initial properties for tests! -->
175164
<concat append="true" destfile="${baseLocation}/plugins/org.eclipse.sdk_3.6.0.v201006080911/plugin_customization.ini">
176165
<filelist dir="${basedir}/prefs" files="plugin_customization.ini" />
@@ -207,7 +196,10 @@
207196
</emma>
208197
</target>
209198

210-
<target name="test" depends="build,-pre-test,-instrument">
199+
<target name="test" depends="build">
200+
<antcall target="-pre-test" />
201+
<antcall target="-instrument" />
202+
211203
<!-- Run the tests. -->
212204
<antcall target="run-core-test">
213205
<param name="test.plugin" value="com.aptana.radrails.tests.all" />

0 commit comments

Comments
 (0)