The version reported by ./maiden version is currently incorrect on a clean build. This PR adjusts the build to inject the current tag / build timestamp into the binary.
Before I committed these changes there was a top-level tag and the new version looks like this:
~$ make && ./maiden version
go build -ldflags="-X github.com/monome/maiden/cmd.version=v1.1.3 -X github.com/monome/maiden/cmd.compileTime=2021-09-10T13:25"
v1.1.3 / 2021-09-10T13:25
~$ go build && ./maiden version
development
After my commit, there is no top-level tag so a hash is included:
~$ make && ./maiden version
go build -ldflags="-X github.com/monome/maiden/cmd.version=v1.1.3-1-gbf56356 -X github.com/monome/maiden/cmd.compileTime=2021-09-10T13:27"
v1.1.3-1-gbf56356 / 2021-09-10T13:27
The version reported by
./maiden version
is currently incorrect on a clean build. This PR adjusts the build to inject the current tag / build timestamp into the binary.Before I committed these changes there was a top-level tag and the new version looks like this:
After my commit, there is no top-level tag so a hash is included: