Using ANT, I'm trying to create a zip file for my build for an update to a released version. To get the list of changed files (this includes .jar files with version strings embedded in the file name), I've done the following:
- Copy the base set of files to a temp location with the version strings stripped out of the file names. I.e. foo_1.0.0.jar -> foo.jar
- Copy the updated set of files to a temp location with the version strings stripped out of the file names. I.e. foo_1.0.1.jar -> foo.jar
- Create a fileset using the "different" selector to compare the two directories with version numbers removed.
I now want to create a fileset that contains the changed files from step 3, but with the full file names from the original updated set. So the fileset I seek would find that foo.jar has changed, and include "foo_1.0.1.jar".
However, I'm struggling to figure out how to match the diff'ed fileset up with the real file set including version numbers. How would one do this in ANT?