diff --git a/.gitignore b/.gitignore index 8d101a18..c55dbb5a 100644 --- a/.gitignore +++ b/.gitignore @@ -36,3 +36,6 @@ Session.vim # Hugo build lock .hugo_build.lock + +# output files should be ignored +mage_out diff --git a/mage/main.go b/mage/main.go index 0062bd35..24592514 100644 --- a/mage/main.go +++ b/mage/main.go @@ -227,7 +227,7 @@ Commands: -version show version info for the mage binary Options: - -d + -d directory to read magefiles from (default "." or "magefiles" if exists) -debug turn on debug messages -f force recreation of compiled magefile @@ -585,7 +585,7 @@ func Compile(goos, goarch, ldflags, magePath, goCmd, compileTo string, gofiles [ for i := range gofiles { gofiles[i] = filepath.Base(gofiles[i]) } - buildArgs := []string{"build", "-o", compileTo} + buildArgs := []string{"build", "-o", compileTo, "-trimpath"} if ldflags != "" { buildArgs = append(buildArgs, "-ldflags", ldflags) }