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

Caddy 1.0.0 release reports version incorrectly #2584

Closed
predominant opened this issue Apr 25, 2019 · 4 comments
Closed

Caddy 1.0.0 release reports version incorrectly #2584

predominant opened this issue Apr 25, 2019 · 4 comments
Labels
upstream ⬆️ Relates to some dependency of this project

Comments

@predominant
Copy link

1. Which version of Caddy are you using (caddy -version)?

Using release 1.0.0

2. What are you trying to do?

Confirm the caddy version:

caddy -version

3. What is your Caddyfile?

N/A

4. How did you run Caddy (give the full command and describe the execution environment)?

caddy -version

5. Please paste any relevant HTTP request(s) here.

N/A

6. What did you expect to see?

v1.0.0

7. What did you see instead (give full error messages and/or log)?

v0.0.0-00010101000000-000000000000

8. Why is this a bug, and how do you think this should be fixed?

Version should at least show v1.0.0 at the start of the version output string.

9. What are you doing to work around the problem in the meantime?

No known workaround.

10. Please link to any related issues, pull requests, and/or discussion.

N/A

Bonus: What do you use Caddy for? Why did you choose Caddy?

N/A

@mholt
Copy link
Member

mholt commented Apr 25, 2019

The version is correct when downloaded from the build server, but because of a bit of a weird quirk with Go modules and some ripple effect down the toolchain + my local build environment, the release assets on GitHub do have the version reported incorrectly, it's true.

The root cause of this, I believe, is at golang/go#29228.

@mholt mholt added the upstream ⬆️ Relates to some dependency of this project label Apr 25, 2019
@stp-ip
Copy link

stp-ip commented Apr 25, 2019

We could read the version ourselves and not rely on the module version, but I assume this was chosen to keep one true version. One downside with this is that the version can't be overwritten via ldflags, which might come in handy.

Workaround in the linked issue feels hacky, but at least a way to overwrite versioning.

@carlwgeorge
Copy link
Contributor

I also use ldflags to set the version for Fedora's RPM package of Caddy. Having a convenient method to define the version during the build (independent of modules) would be nice to have.

@mholt
Copy link
Member

mholt commented Nov 8, 2019

I haven't updated the automated build process I use here to do Caddy releases, and I will be rewriting it for v2, which is just around the corner, so this is unlikely to get fixed, FYI. Sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
upstream ⬆️ Relates to some dependency of this project
Projects
None yet
Development

No branches or pull requests

4 participants