You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by jd...@apache.org on 2007/05/31 02:42:36 UTC
svn commit: r543000 -
/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
Author: jdillon
Date: Wed May 30 17:42:35 2007
New Revision: 543000
URL: http://svn.apache.org/viewvc?view=rev&rev=543000
Log:
Add is latest support
Modified:
geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy?view=diff&rev=543000&r1=542999&r2=543000
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy (original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy Wed May 30 17:42:35 2007
@@ -92,6 +92,13 @@
log.debug("[${i++}] $it")
}
}
+
+ // Save the state of the library
+ def props = new Properties()
+ props['buildLifeId'] = _buildLifeId
+
+ def statusFile = new File(baseDir, '.library-info.properties')
+ props.store(statusFile.newOutputStream(), null)
}
boolean isLatest() {
@@ -99,14 +106,28 @@
assert exists()
- //
- // TODO
- //
+ def statusFile = new File(baseDir, '.library-info.properties')
+ if (!statusFile.exists()) {
+ return false
+ }
+
+ def props = new Properties()
+ props.load(statusFile.newInputStream())
+
+ CodestationClient client = new CodestationClient(serverURL, true)
+ client.debug = true
+
+ def doc = lookupProject(client)
+ def buildLifeId = client.extractBuildlifeId(doc)
+
+ log.info("Have buildLifeId: ${props['buildLifeId']}, latest is: ${buildLifeId}")
+
+ return props['buildLifeId'] == buildLifeId
}
void update() {
//
- // TODO
+ // TODO: Delete the current tree, checkout again
//
}