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

fix internal/config version 1.6.0 -> 1.7.0 #44

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

x123
Copy link
Contributor

@x123 x123 commented Nov 28, 2024

The current 1.7.0 release actually reports being version 1.6.0 when using then -version flag:

$ ./certstream-server-go -version
certstream-server-go v1.6.0

This appears to be due to the internal/config/config.go not being updated with the 1.7.0 release.

I appreciate this will appear relatively trivial, but it breaks automated build testing using simple version testers in nixpkgs, (I'm packaging certstream-server-go for inclusion in nixpkgs, which is how I discovered it).

I didn't see a CONTRIBUTING.md, so I thought for such a small fix maybe a PR was best, instead of opening an issue on it.

@x123 x123 changed the title internal config version 1.6.0 -> 1.7.0 fix internal/config version 1.6.0 -> 1.7.0 Nov 28, 2024
@x123 x123 marked this pull request as ready for review November 28, 2024 06:23
@d-Rickyy-b
Copy link
Owner

Ah damn, I constantly miss these kind of things with versioning. I really need a way to either automate the version string or at least add a check in my build process to warn me of that. You don't happen to have some suggestions or best practices?

Thanks for the PR!

@d-Rickyy-b d-Rickyy-b merged commit d4942c7 into d-Rickyy-b:master Nov 28, 2024
2 of 3 checks passed
@d-Rickyy-b
Copy link
Owner

d-Rickyy-b commented Nov 28, 2024

I appreciate you packaging the tool for nixpkgs :) Do you need me to re-tag the github release as well, or are you fine with the correct version in the config? Let me know if there is anything else you need to properly package the software.

Also just to let you know: you can use ldflags to overwrite the version string with the current github tag. I use this for building on github.

ldflags: -s -w -X github.com/d-Rickyy-b/certstream-server-go/internal/config.Version={{.Version}}

@x123
Copy link
Contributor Author

x123 commented Nov 28, 2024

I really need a way to either automate the version string or at least add a check in my build process to warn me of that. You don't happen to have some suggestions or best practices?

I'm hardly an expert. I have made the same mistake in my own repos many times. About the only things that have worked for me are a checklist to follow on each release and/or a simple shell script to automate the version bumps in the right places.

Do you need me to re-tag the github release as well, or are you fine with the correct version in the config?

I believe for the changes to be included when pulled into nixpkgs, a new tag or re-tag release would be needed. That said, I've omitted the version check for now in NixOS/nixpkgs#359739, and technically I could enable it later on a subsequent release where the version string matches the release. It's completely up to you, as it's a nice-to-have, not a need-to-have.

Thanks for the PR!

Thanks for all the hard work on the Go fork of the server.

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

Successfully merging this pull request may close these issues.

2 participants