Re: Release script patch and a bit more
Shane Duan <[email protected]>
| Newsgroups | gmane.comp.java.cruise-control.user |
|---|---|
| Message-ID | <[email protected]> |
Hi, I have just used 2.8.2 to set up lava lamp. Many thanks to Jeffrey's help, I figured out what was wrong. There are two files missing in the lib directory during the packaging. Here is the patch to include those two files (win32com.dll and javax.comm.properties). When I ran test as part of the packaging script, I happened to run into the rare case in which a test becomes broken when the second turned at the right moment . So I fixed that also. I also changed the document a bit because I misread it and thought the interfaceModule set up does not apply to windows OS. Stupid, I know. But I think document can be improved to avoid another reader like me. I'll think about how to make further change on the X10 publisher documentation and submit another patch. I have written down the notes that I took at the bottom in this blog that I just wrote (http://agileworks.blogspot.com/2009/02/lava-lamp-with-cruisecontrol.html), in case someone wants to take a crack at the task. Thanks -- Shane http://www.shaneduan.com ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Cruisecontrol-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/cruisecontrol-user
release_script_patch_and_a_bit_more.patch
(application/octet-stream, 5.3 KB)
Index: main/src/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListener.java
===================================================================
--- main/src/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListener.java (revision 4311)
+++ main/src/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListener.java Thu Feb 19 23:56:52 PST 2009
@@ -63,12 +63,17 @@
public static final String MSG_PREFIX_PROGRESS = "progress: ";
public void handleEvent(ProjectEvent event) throws CruiseControlException {
+ Date date = new Date();
+ handleEvent(event, date);
+ }
+
+ void handleEvent(ProjectEvent event, Date date) throws CruiseControlException {
- if (event instanceof ProjectStateChangedEvent) {
- final ProjectStateChangedEvent stateChanged = (ProjectStateChangedEvent) event;
- final ProjectState newState = stateChanged.getNewState();
- LOG.debug("updating status to " + newState.getName() + " for project " + stateChanged.getProjectName());
- final String text = newState.getDescription() + " since\n";
+ if (event instanceof ProjectStateChangedEvent) {
+ final ProjectStateChangedEvent stateChanged = (ProjectStateChangedEvent) event;
+ final ProjectState newState = stateChanged.getNewState();
+ LOG.debug("updating status to " + newState.getName() + " for project " + stateChanged.getProjectName());
+ final String text = newState.getDescription() + " since\n";
- CurrentBuildFileWriter.writefile(text, new Date(), fileName);
+ CurrentBuildFileWriter.writefile(text, date, fileName);
} else if (event instanceof ProgressChangedEvent) {
final ProgressChangedEvent progressChanged = (ProgressChangedEvent) event;
final String msgProgress = DateUtil.formatIso8601(progressChanged.getProgress().getLastUpdated())
@@ -83,7 +88,7 @@
}
}
- private String getStatusTextPrefix() throws CruiseControlException {
+ private String getStatusTextPrefix() throws CruiseControlException {
String statusPrefix = "";
final File statusFile = new File(fileName);
Index: main/test/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListenerTest.java
===================================================================
--- main/test/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListenerTest.java (revision 4311)
+++ main/test/net/sourceforge/cruisecontrol/listeners/CurrentBuildStatusListenerTest.java Thu Feb 19 23:56:52 PST 2009
@@ -71,7 +71,7 @@
private void checkResultForState(final String fileName, final Date date, final ProjectState state)
throws CruiseControlException, IOException {
- listener.handleEvent(new ProjectStateChangedEvent("projName", state));
+ listener.handleEvent(new ProjectStateChangedEvent("projName", state), date);
final String expected = getExpectedStateText(date, state);
assertEquals(expected, Util.readFileToString(fileName));
}
Index: build.xml
===================================================================
--- build.xml (revision 4311)
+++ build.xml Thu Feb 19 23:45:30 PST 2009
@@ -137,7 +137,7 @@
<zipfileset src="binaryrelease/connectfour.zip" filemode="644" dirmode="755" prefix="${cc.bin.zip.prefix}/projects"/>
<zipfileset src="${apache.ant.zip}" prefix="${cc.bin.zip.prefix}"/>
<zipfileset dir="main/lib" includes="junit*.jar" prefix="${cc.bin.zip.prefix}/${apache.ant}/lib"/>
- <zipfileset dir="main/lib" includes="*.jar" prefix="${cc.bin.zip.prefix}/lib" excludes="inmemorysfee*.jar, checkstyle*, **/.svn"/>
+ <zipfileset dir="main/lib" includes="*.jar, *.dll, *.properties" prefix="${cc.bin.zip.prefix}/lib" excludes="inmemorysfee*.jar, checkstyle*, **/.svn"/>
<zipfileset dir="main/lib/licenses" includes="*.txt" prefix="${cc.bin.zip.prefix}/lib/licenses"/>
<zipfileset file="main/lib/ant/ant.jar" prefix="${cc.bin.zip.prefix}/lib"/>
<zipfileset file="main/lib/ant/ant-launcher.jar" prefix="${cc.bin.zip.prefix}/lib"/>
Index: documentation/main/configxml.html
===================================================================
--- documentation/main/configxml.html (revision 4311)
+++ documentation/main/configxml.html Thu Feb 19 23:50:49 PST 2009
@@ -9863,9 +9863,10 @@
extract <code>commapi/lib/libLinuxSerialParallel.so</code>
and point <code>LD_LIBRARY_PATH</code> to it, like so:
<pre><code>export LD_LIBRARY_PATH=$HOME/commapi/lib${LD_LIBRARY_PATH+:$LD_LIBRARY_PATH}</code></pre></li>
- <li>Add the x10 publisher to CruiseControl's config.xml.
+ <li>Add the x10 publisher to CruiseControl's config.xml. Make sure that your interface model
+ and port is correct.<br/>
For example, on Windows:
- <pre><code><x10 houseCode="A" deviceCode="3" port="COM1" /></code></pre>
+ <pre><code><x10 houseCode="A" deviceCode="3" interfaceModel="cm17a" port="COM1" /></code></pre>
On Linux:
<pre><code><x10 houseCode="A" deviceCode="1" interfaceModel="cm17a" port="/dev/ttyS0" /></code></pre></li>
</ol>