-
Notifications
You must be signed in to change notification settings - Fork 40
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
Setting a version number with ldflags #14
Comments
Here is a version of your bash script that I am using to achieve the above: https://github.com/chelnak/gh-environments/blob/32d3ee6f12638a6f8ab5577ba89b838254abd0b7/build.sh Resulting in a binary that has a version number |
@chelnak It's a solid proposal, but I'm thinking of a better solution to having each individual extension bake their version number in: since GitHub CLI knows the version number (or git SHA) of every extension installed, how about making a change to GitHub CLI so that |
That could be really neat! I'd actually forgotten about this PR and ended up using goreleaser for my extension. I wonder what happens if the extension wants to check for version updates. It's handy having the current version within the context of the app for this purpose.. You could call back in to the main cli with the SDK I guess.. or even implement a helper method. What do you think? |
Hey!
Would you consider using ldflags to allow developers to bake a version number in to the binaries?
https://www.digitalocean.com/community/tutorials/using-ldflags-to-set-version-information-for-go-applications
It could be an optional parameter for the action coupled with some documentation.
I'd be happy to submit a PR if it's something you think could be useful.
The text was updated successfully, but these errors were encountered: