Thanks
I'm one user who has used this project.
Thank you so much for always developing and maintaining compatibility!
Requirement (business use case)
Add additional information to mage static binary via -ldflags .
For example, a use case for -ldflags would be if you want to verify that the mage binary is an up-to-date magefile.go binary.
By using -ldflags to embed the hash value in the mage binary, you can compare it with the latest magefile.go's hash to see if it is the latest one.
It's also useful to include Git information.
Problem
Currently, when compiling mage statically, mage doesn't support ldflags flag.
Proposal
Add a new flag -ldflags for mage.
This flag can be used in case of passed -compile flag.
I want to add this flag around here.
Remark
I have a patch for this issue.
So, i can send a PR.
Thanks!
Thanks
I'm one user who has used this project.
Thank you so much for always developing and maintaining compatibility!
Requirement (business use case)
Add additional information to mage static binary via
-ldflags.For example, a use case for
-ldflagswould be if you want to verify that the mage binary is an up-to-date magefile.go binary.By using
-ldflagsto embed the hash value in the mage binary, you can compare it with the latest magefile.go's hash to see if it is the latest one.It's also useful to include Git information.
Problem
Currently, when compiling mage statically, mage doesn't support
ldflagsflag.Proposal
Add a new flag
-ldflagsfor mage.This flag can be used in case of passed
-compileflag.I want to add this flag around here.
Remark
I have a patch for this issue.
So, i can send a PR.
Thanks!