github magefile/mage v1.6.1
v1.6.1 . Tweaked GoCache

latest releases: v1.15.0, v1.14.0, v1.13.0...
5 years ago

Fixed

PR #172 brought up a problem with systems where the magefile cachedir is on a different drive. On these machines, trying to move the generated mainfile fails because it's not a simple rename, you have to copy the data. However, this defeats the purpose of moving the mainfile, which was just to retain the modtime so the go tool wouldn't think it was newer than the compiled binary.

Upon more reflection the obvious thing to do is just to generate the mainfile tweak its mod time to be old. That's what this change does, which greatly simplifies that code, and fixes the bug.

Changelog

Don't cache mainfiles, just set modtime (#173)

Don't miss a new mage release

NewReleases is sending notifications on new releases.