VSoft Technologies Blogs

rss

VSoft Technologies Blogs - posts about our products and software development.

File Dependencies

Have you ever wished you can have your build check whether or not files have changed, so you know whether or not to rebuild?

With FinalBuilder 4, you now can! Check out the new File Dependency action (you will need the latest public beta.)

Sample Project

This is a skeleton action list that does two things:

  1. It synchronizes a local copy of the source files (via SurroundSCM Get.)
  2. It checks the file dependencies to see if anything has changed. Lets zoom in on the File Dependency action:

Source Files

In Files and Folders to check, I'm telling FinalBuilder to look at the modification dates of all the main FinalBuilder source and resource files.  Because I've chosen Recurse into subdirectories, FinalBuilder will scan the subdirectories of each for all files of those types.

So, how do we know if the files have changed?

Source Files

As you can see, I've told FinalBuilder to check for any files which have changed since the last time the action was run. In the Options section, I've elected to have FinalBuilder ignore any files created within two minutes of the last run, to compensate for jitter in the modification dates.

You can see in the greyed-out “Use date from file“ section that I could have elected to compare the modification dates of the compiled libraries, in order to be really sure whether or not to rebuild.

In fact, you can build a simple continous integration tool with just one more action:

Poor Man's Continous Integration

Example1 re-schedules itself (using the Schedule Add action and the Windows Scheduler) to run 10 minutes after it finishes, but only starts a build if there are files that have changed.

Example 2 is even simpler - it loops continously checking for changed files (with a short delay in between each loop.) I also put in a separate check so the help file is only rebuilt if it has changed.

Showing 0 Comment


Comments are closed.