rvesse / airline

Java annotation-based framework for parsing Git like command line structures with deep extensibility
https://rvesse.github.io/airline/
Apache License 2.0
128 stars 20 forks source link

Add an @Version help annotation #41

Closed rvesse closed 8 years ago

rvesse commented 8 years ago

It would be useful to have an easy way to inject a Version details section into help via an @Version annotation e.g.

@Version(
  source = "version.properties", 
  versionProperty = "version",
  buildProperty = "build",
  commitProperty = "commit",
  dateProperty = "buildDate",
  additionalProperties = { "author" }, 
  additionalTitles = { Author }
)

Where source specifies some class path resource from which to extract the data (must be a properties file) and the other fields specify the fields from which to extract the relevant data