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

Packaging helmsman: how to properly set the version using ldflags (or or those obsolete)? #941

Open
kastl-ars opened this issue Feb 22, 2025 · 0 comments

Comments

@kastl-ars
Copy link

Dear maintainers,

I found helmsman and found it very interesting, so I started packaging it for openSUSE.

One thing I stumbled upon: The Makefile has ldflags that set the version to "${TAG}-${DATE}". However I noticed there are two different capitalizations:

https://github.com/Praqma/helmsman/blob/master/Makefile#L64

vs.

https://github.com/Praqma/helmsman/blob/master/Makefile#L86

main.version vs. main.Version (with a capital V).

However, no matter which one I use the version output is only containing the tag.

$ ./helmsman version

 _          _ 
| |        | | 
| |__   ___| |_ __ ___  ___ _ __ ___   __ _ _ __
| '_ \ / _ \ | '_ ` _ \/ __| '_ ` _ \ / _` | '_ \ 
| | | |  __/ | | | | | \__ \ | | | | | (_| | | | | 
|_| |_|\___|_|_| |_| |_|___/_| |_| |_|\__,_|_| |_| version: v3.17.1
A Helm-Charts-as-Code tool.

2025-02-22 11:12:12 INFO: No desired state files provided.

I checked the release tarball and this behaviour is consistent.

So, is this some peculiarity of go that it only shows parts of the main.version variable? Or is the ldflags call just broken in the Makefile?

I found that the version is already set in two places, so it might just be that the ldflags are not needed, at all?

Thanks in advance!

Kind Regards,
Johannes

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