mage: `mage -version` does not return version information
Currently the output of mage -version
is:
Mage Build Tool
Build Date: <not set>
Commit: <not set>
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 1
- Comments: 16 (8 by maintainers)
Right now, mage -version is only populated if you use the (downloaded) binary version of mage, or if you build mage with
mage build
.There’s no way to hard code the specific commit revision in the sourcecode, but I could hard code the major version number, which would at least give you an idea of what you’re running.
I just merged a change that’ll make the
mage build
target use -a, so it’ll do the right thing. There’s also now better installation instructions, and a bootstrap.go file that you cango run
for first time users that don’t have mage yet.Thanks for reporting this, you’ve made the first-time experience a lot better because of it 😃
Build and commit fields are still unset ⁉️ But modification time of mage binary in
"${GOPATH}/bin"
hasn’t changed a bit so I would suspect that something is not quite working as expected in the build process…Looks like there is a problem with the
-ldflags
param value assignment 🐛