Repository navigation
feature/wgcf/version-command - #636
Open
michaelik1 wants to merge 3 commits into
Open
michaelik1 wants to merge 3 commits into
michaelik1 wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Resolves #193.
Users running wgcf in automated environments need a reliable way to retrieve the current version for use in scripts, update checks, and other tools.
Description
Adds a
--versionflag that prints only the current version string (e.g.v2.3.1), matching the GitHub release tag format.Usage:
For local development builds, the version defaults to
dev. A custom version can also be injected at build time using linker flags:GoReleaser is also configured to automatically inject the release version during builds, so each release binary reports its own version without requiring manual updates to the source code.
Added tests to verify the exact
--versionoutput and build-time version injection.@ViRb3