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

Generate go file that represent VersionInfo struct #34

Merged
merged 11 commits into from Jul 3, 2020

Conversation

linquize
Copy link
Contributor

go generate a .go file from versioninfo.json.

This allows the program to get version info from a global variable. For example, when starting the program, it prints the program name, version and copyright from a global variable.
This is also useful in non-Windows platforms too.
Every time when preparing a program release, the developer only need to update versioninfo.json.

@coveralls
Copy link

coveralls commented Sep 18, 2019

Coverage Status

Coverage decreased (-1.0%) to 92.291% when pulling 4e854d1 on linquize:writego into e59661e on josephspurrier:master.

@linquize
Copy link
Contributor Author

linquize commented Mar 8, 2020

test coverage increased

@msays2000
Copy link

Will this be checked in anytime soon :) or should we work with a fork of this code.

@linquize
Copy link
Contributor Author

@msays2000 Oh, you have just forked the project and merged me code.

@msays2000
Copy link

msays2000 commented Jun 18, 2020

yes, I was testing to see if the PR will work to generate the versionInfo.go file. It does but in forked branch I had to change the import paths.

I think many will just like a short version format string rather than a full deserialized struct object may be a small method to return the semantic version.

const Version = "x.x.x.x"

@msays2000
Copy link

btw, I have deleted my fork after testing.

@josephspurrier
Copy link
Owner

I need to test this locally - let me see if I can get to it this weekend. Sorry for the delay.

@josephspurrier josephspurrier merged commit bc05c04 into josephspurrier:master Jul 3, 2020
@josephspurrier
Copy link
Owner

Thanks for adding in this functionality! I made it optional and changed the name of the parameters to be more descriptive.

@linquize linquize deleted the writego branch February 23, 2021 06:16
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.

None yet

4 participants