diff options
author | Henri Sara <henri.sara@itmill.com> | 2011-08-17 08:32:29 +0000 |
---|---|---|
committer | Henri Sara <henri.sara@itmill.com> | 2011-08-17 08:32:29 +0000 |
commit | aade55ae17d4e40b0ad64ae8d3c2a2205897f6ff (patch) | |
tree | 1373b7e33dfc65226471d34489179bd98b9f0821 /build/bin | |
parent | 54e206d385cc9f52ecdb1920c68718f0f642b789 (diff) | |
download | vaadin-framework-aade55ae17d4e40b0ad64ae8d3c2a2205897f6ff.tar.gz vaadin-framework-aade55ae17d4e40b0ad64ae8d3c2a2205897f6ff.zip |
#7381 Packaging changes for Vaadin 6.7: JAR and test WAR only, no demo WAR nor ZIP; some cleanup (files that were in ZIP, build.xml)
svn changeset:20444/svn branch:6.7
Diffstat (limited to 'build/bin')
-rwxr-xr-x | build/bin/package-diff.py | 71 |
1 files changed, 5 insertions, 66 deletions
diff --git a/build/bin/package-diff.py b/build/bin/package-diff.py index ec3b87f97b..2add68695e 100755 --- a/build/bin/package-diff.py +++ b/build/bin/package-diff.py @@ -24,31 +24,6 @@ def command(cmd, dryrun=0): print "Dry run - not executing." ################################################################################ -# List files in an archive. -################################################################################ -def listZipFiles(archive): - pin = os.popen("unzip -l -qq %s | cut -c 29- | sort" % (archive), "r") - files = map(lambda x: x.strip(), pin.readlines()) - pin.close() - - cleanedfiles = [] - for file in files: - # Remove archive file name from the file names - slashpos = file.find("/") - if slashpos != -1: - cleanedname = file[slashpos+1:] - else: - cleanedname = file - - # Purge GWT compilation files. - if cleanedname.find(".cache.html") != -1: - continue - - cleanedfiles.append(cleanedname) - - return cleanedfiles - -################################################################################ # Difference of two lists of files ################################################################################ def diffFiles(a, b): @@ -78,27 +53,9 @@ def listJarFiles(jarfile): return files ################################################################################ -# Lists files inside a Vaadin Jar inside a ZIP -################################################################################ - -# For Vaadin 6.3 Zip -def listZipVaadinJarFiles(zipfile, vaadinversion): - jarfile = "vaadin-%s/WebContent/vaadin-%s.jar" % (vaadinversion, vaadinversion) - extractedjar = "/tmp/vaadinjar-tmp-%d.jar" % (os.getpid()) - zipcmd = "unzip -p %s %s > %s " % (zipfile, jarfile, extractedjar) - command (zipcmd) - files = listJarFiles(extractedjar) - command ("rm %s" % (extractedjar)) - 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)) - +def japize(version, 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) @@ -125,7 +82,7 @@ latestversion = latestdata[0].strip() latestpath = latestdata[1].strip() latestURL = downloadsite + "/" + latestpath + "/" -latestfilename = "vaadin-%s.zip" % (latestversion) +latestfilename = "vaadin-%s.jar" % (latestversion) latestpackage = latestURL + latestfilename locallatestpackage = "/tmp/%s" % (latestfilename) @@ -144,34 +101,16 @@ except OSError: wgetcmd = "wget -q -O %s %s" % (locallatestpackage, latestpackage) command (wgetcmd) -# List files in latest version. -latestfiles = listZipFiles(locallatestpackage) - # List files in built version. builtversion = sys.argv[1] -builtpackage = "build/result/vaadin-%s.zip" % (builtversion) -builtfiles = listZipFiles(builtpackage) +builtpackage = "build/result/vaadin-%s/WebContent/vaadin-%s.jar" % (builtversion, builtversion) # Report differences -print "\n--------------------------------------------------------------------------------\nVaadin ZIP differences" - -# New files -newfiles = diffFiles(builtfiles, latestfiles) -print "\n%d new files:" % (len(newfiles)) -for item in newfiles: - print item - -# Removed files -removed = diffFiles(latestfiles, builtfiles) -print "\n%d removed files:" % (len(removed)) -for item in removed: - print item - print "\n--------------------------------------------------------------------------------\nVaadin JAR differences" -latestJarFiles = listZipVaadinJarFiles(locallatestpackage, latestversion) -builtJarFiles = listZipVaadinJarFiles(builtpackage, builtversion) +latestJarFiles = listJarFiles(locallatestpackage) +builtJarFiles = listJarFiles(builtpackage) # New files newfiles = diffFiles(builtJarFiles, latestJarFiles) |