Improve portability of cache file detection for command targets #1655

Merged
merged 2 commits into from Apr 8, 2013

Projects

None yet

3 participants

@nubs
Contributor
nubs commented Mar 12, 2013

Several plugins were using the stat command to determine modified time in order to determine if cached targets needed to be updated. This command needed to be different on OS/X than on other OS's. Using the [ builtin's -nt comparison does this and should be more portable.

The phing task also had some regex's that would remove legitimate targets from completion.

nubs added some commits Mar 12, 2013
@nubs nubs Use [ -nt ] instead of stat -f%m to check cache files. 300f94c
@nubs nubs Allow ":" and "-" characters in phing tasks.
Tasks that included hyphens or colons were being excluded from
completion.  This improves the usage for this.
bdf4f5a
@robbyrussell robbyrussell merged commit dda1154 into robbyrussell:master Apr 8, 2013
@mcornella
Collaborator

This PR introduced the -nt syntax wrong. The arguments should be switched in order to have the desired effect (regenerate file if build definition files are newer than cache file).

The gradle plugin was fixed in #2418 and #2827 (diff section).
The phing plugin was fixed in #2094.
The ant plugin is going to be fixed in #3329.
The cake plugin remains to be fixed is fixed in #3419.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment