Skip to content
New issue

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

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

Already on GitHub? # to your account

Improve caddy version to include revision information #4926

Closed
francislavoie opened this issue Aug 2, 2022 · 2 comments · Fixed by #4931
Closed

Improve caddy version to include revision information #4926

francislavoie opened this issue Aug 2, 2022 · 2 comments · Fixed by #4931
Assignees
Labels
feature ⚙️ New feature or request
Milestone

Comments

@francislavoie
Copy link
Member

Go 1.18 adds more information into the build that could be used to make caddy version show more useful information for go build builds, instead of just showing (devel) which is pretty useless. https://tip.golang.org/doc/go1.18#go-version

@mholt
Copy link
Member

mholt commented Aug 2, 2022

Ok, so this works, but annoyingly not for go run, only go build. Will open a PR soon.

@mholt
Copy link
Member

mholt commented Aug 2, 2022

Meh, ok, so it only kinda works. The vcs.revision key gives us the commit SHA, but not the tag or "version" like what the current build info does.

I suppose that's what golang/go#29228 and golang/go#50603 are for.

But if no proper version is available, we can still print out something useful instead of (devel) or unknown this way. Unfortunately we still have to maintain our current build practices of putting Caddy as the non-main package in the meantime.

mholt added a commit that referenced this issue Aug 4, 2022
Close #4926

New Version() function returns a simple and full version string.

Go module information is still preferred. Then vcs info.
@mholt mholt modified the milestones: v2.6.0-beta.1, v2.6.0 Sep 13, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
feature ⚙️ New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants