diff options
author | Marko Grönroos <magi@iki.fi> | 2010-06-24 12:33:28 +0000 |
---|---|---|
committer | Marko Grönroos <magi@iki.fi> | 2010-06-24 12:33:28 +0000 |
commit | f5e6b759d2d90cfd43e43f0619b5131f506e3fed (patch) | |
tree | e8233a46f76c7d2774abd540e565064898e1f5c6 /build/bin | |
parent | 885bc4718cbf62aa9f7dd8a68c2aa89f3245a172 (diff) | |
download | vaadin-framework-f5e6b759d2d90cfd43e43f0619b5131f506e3fed.tar.gz vaadin-framework-f5e6b759d2d90cfd43e43f0619b5131f506e3fed.zip |
Added Japitools comparison to differences script.
svn changeset:13909/svn branch:6.4
Diffstat (limited to 'build/bin')
-rwxr-xr-x | build/bin/package-diff.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/build/bin/package-diff.py b/build/bin/package-diff.py index eec305b243..ec3b87f97b 100755 --- a/build/bin/package-diff.py +++ b/build/bin/package-diff.py @@ -9,6 +9,9 @@ from sets import Set downloadsite = "http://vaadin.com/download" latestfile = "/LATEST" +JAPIZE = "japize" +JAPICOMPAT = "japicompat" + ################################################################################ # Utility Functions ################################################################################ @@ -89,6 +92,26 @@ def listZipVaadinJarFiles(zipfile, vaadinversion): return files ################################################################################ +# JAPI - Java API Differences +################################################################################ +def japize(version, zipfile): + jarfile = "/tmp/vaadin-tmp.jar" + packagedjar = "vaadin-%s/WebContent/vaadin-%s.jar" % (version, version) + command ("unzip -p %s %s > %s " % (zipfile, packagedjar, jarfile)) + + cmd = "%s as %s apis %s +com.vaadin, $JAVA_HOME/jre/lib/rt.jar lib/core/**/*.jar 2>/dev/null" % (JAPIZE, version, jarfile) + command (cmd) + + return "%s.japi.gz" % (version) + +def japicompat(japi1, japi2): + cmd = "%s -q %s %s" % (JAPICOMPAT, japi1, japi2) + pin = os.popen(cmd, "r") + lines = "".join(pin.readlines()) + pin.close() + return lines + +################################################################################ # ################################################################################ @@ -162,5 +185,17 @@ print "\n%d removed files:" % (len(removed)) for item in removed: print item +print "\n--------------------------------------------------------------------------------\nVaadin API differences" +oldjapi = japize(latestversion, locallatestpackage) +newjapi = japize(builtversion, builtpackage) + +print "\n--------------------------------------------------------------------------------\nLost API features\n" +japidiff1 = japicompat(oldjapi, newjapi) +print japidiff1 + +print "\n--------------------------------------------------------------------------------\nNew API features\n" +japidiff2 = japicompat(newjapi, oldjapi) +print japidiff2 + # Purge downloaded package command("rm %s" % (locallatestpackage)) |