-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
Add --version and --help flags to executables #97
Conversation
Renamed scripts, too
added help flag to README usage
Escaped quotes were unnecessary and failed to pass properly added v back to start of version strings
I'm glad to see you implemented my proposal. Just one note: I would be wary of using the |
Good point, removed |
@RKinsey I think you can also add |
Got it |
Would be great if this PR could be accepted. What say you, @FiloSottile? :-) |
Just a thought: There are two relevant version strings related to the Do you want to consider wording the
|
I'd love to see this land! Any updates @RKinsey |
Most users will eventually use @brad2014 that's a good point, but we don't plan to ever drop support for older versions of the spec, so for now I think it's fine not to expose it. |
I think it may be better to expose info for debug purposes. |
Closes #74 , Closes #101
This patch adds flags for access to the usage message and the version tag/hash as requested in #74 and #57, respectively.
age
andage-keygen
with the--help
or-h
flag will print their usage message and exit, andage
will also print usage when no flags or arguments are passed. Per #22, I didn't addage help
.age-keygen
now has a usage message.(Removed, see below)-v
and--version
work for bothage
andage-keygen
, and will print the most recent git info at time of compilation. There are two build scripts (bash and Powershell) that grab the most recent tag and current short hash, and uses -ldflags to pass them to main.version and main.commit (named for compatibility with goreleaser defaults). Current format isand
Version: [most recent tag]
when on a tagged commit or the --release flag is passed to the script.I also updated the Homebrew formula for this, but it doesn't currently have an effect