no git tags in go 1.18 new buildinfo

629 views
Skip to first unread message

JeffG

unread,
Mar 16, 2022, 5:27:54 AM3/16/22
to golang-nuts
hi,

I just tested the new 1.18 BuildInfo addition (see https://go.dev/doc/go1.18#debug/buildinfo ) and was  hoping to get ride if our build wrapper(makefile) and the ldflags trick to embed the git tag in the main binary.

But it seems this new feature doesn't know about git tags ? Have I missed something or is it by design ?
 
Thx

Sean Liao

unread,
Mar 16, 2022, 5:47:38 PM3/16/22
to golang-nuts

JeffG

unread,
Mar 17, 2022, 3:55:40 AM3/17/22
to golang-nuts
thx  for this link.

But it implies a specific usage of tags (interpreting them as a "version" / "pseudo version"). I was thinking about a more general approach, just embed tags. I added a comment to the github issue.
Then people can check for a tag in buildinfo and eventually use it as Version value for instance.
Le mercredi 16 mars 2022 à 22:47:38 UTC+1, se...@liao.dev a écrit :
Reply all
Reply to author
Forward
0 new messages