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 in code does not match that in tagged releases. #3

Closed
gedw99 opened this issue Dec 5, 2023 · 4 comments
Closed

version in code does not match that in tagged releases. #3

gedw99 opened this issue Dec 5, 2023 · 4 comments

Comments

@gedw99
Copy link

gedw99 commented Dec 5, 2023

the version is hardcoded but the tagged release does not match.

Here is where we hard code the version number.

https://github.com/vorlif/xspreak/blob/15a5c7eddac3fdc55e0550308581516aee9c491e/commands/root.go#L24C18-L24C18

Below it shows the wrong version number..

go install github.com/vorlif/xspreak@v0.10.0
 xspreak --version
xspreak version v0.9.0

common thing but annoying ..

So maybe just write a makefile target to do both so it does not happen again.
It would create the tag at the same time as updating the version that is hardcoded in the golang code.

ok I see your doing it in CI at https://github.com/vorlif/xspreak/blob/main/.github/workflows/release.yml

so modify this to do a sed update of that golang version line then ?

@gedw99 gedw99 changed the title version version in code does not match that in tagged releases. Dec 5, 2023
@vorlif
Copy link
Owner

vorlif commented Dec 5, 2023

Hi @gedw99,

Thanks for the report. I agree with you, it's not nice. I'll try to set the version number with #4 automatically.

@vorlif vorlif closed this as completed in 24773e5 Dec 5, 2023
vorlif added a commit that referenced this issue Dec 5, 2023
Fix #3 - Try to set the version number automatically
@gedw99
Copy link
Author

gedw99 commented Dec 6, 2023

Thankyou . I will have a look.

@gedw99
Copy link
Author

gedw99 commented Dec 7, 2023

@vorlif yes it works for me here. thanks !!

The go install github.com/vorlif/xspreak@v0.10.0 version of course still reports as xspreak version v0.9.0, but thats cool. If you want do a tagged release of v 0.11.0 and then go of for it or just leave it.

The go install from source reports version as xspreak version (devel), which is correct.

@vorlif
Copy link
Owner

vorlif commented Dec 7, 2023

Thank you.

If you install the latest version, the correct version number will be displayed:

go install github.com/vorlif/xspreak@v0.10.1

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

2 participants