Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-version info is "not as useful" as it may should've been #154

Open
stdedos opened this issue Dec 5, 2022 · 0 comments
Open

-version info is "not as useful" as it may should've been #154

stdedos opened this issue Dec 5, 2022 · 0 comments

Comments

@stdedos
Copy link

stdedos commented Dec 5, 2022

Version in the tagged version:

go-junit-report/main.go

Lines 14 to 18 in 7fde464

var (
Version = "v2.0.0-dev"
Revision = "HEAD"
BuildTime string
)

Version @https://github.com/jstemmer/go-junit-report/blob/master as of now:

go-junit-report/main.go

Lines 18 to 22 in e939e4f

var (
Version = "v2.0.0-dev"
Revision = "HEAD"
BuildTime string
)

May I suggest something along the lines of:

//go:generate sh -c "git describe --tags --first-parent --abbrev=0 > commit.txt"
//go:embed commit.txt

for "rolling" builds, and "hardcoded" changes on tagged commits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant