magefile / mage

a Make/rake-like dev tool using Go
https://magefile.org
Apache License 2.0
4.01k stars 250 forks source link

refactor(compile): add trimpath to compile to remove local paths #457

Open sheldonhull opened 1 year ago

sheldonhull commented 1 year ago

Go documentation on this:

-trimpath remove all file system paths from the resulting executable. Instead of absolute file system paths, the recorded file names will begin either a module path@version (when using modules), or a plain import path (when using the standard library, or GOPATH).

jaredallard commented 1 year ago

I feel like the aqua part should be called out in the title/desc somewhere....

EDIT: Ah, I see, that is from https://github.com/magefile/mage/pull/451 and just wasn't removed when making this PR. I'd suggest cleaning that up :D

sheldonhull commented 1 year ago

My mistake. I did a pr for that but did it on main branch in fork resulting in my new branch including that. I’ll have to separate this out.

sheldonhull commented 1 year ago

@jaredallard reverted back so pr changes are now just this. Not sure about compatibility for prior go versions to 1.13 like I mentioned but otherwise this will be good for privacy. Right now compiled binary includes full path. Cheers