Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ Session.vim

# Hugo build lock
.hugo_build.lock

# output files should be ignored
mage_out
4 changes: 3 additions & 1 deletion mage/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ Commands:
-version show version info for the mage binary

Options:
-d <string>
-d <string>
directory to read magefiles from (default "." or "magefiles" if exists)
-debug turn on debug messages
-f force recreation of compiled magefile
Expand Down Expand Up @@ -591,6 +591,8 @@ func Compile(goos, goarch, ldflags, magePath, goCmd, compileTo string, gofiles [
gofiles[i] = filepath.Base(gofiles[i])
}
buildArgs := []string{"build", "-o", compileTo}
buildArgs = append(buildArgs, "-trimpath")

if ldflags != "" {
buildArgs = append(buildArgs, "-ldflags", ldflags)
}
Expand Down