jwaldrip / admiral.cr

A robust DSL for writing command line interfaces written in Crystal.
https://jwaldrip.github.com/admiral.cr
MIT License
135 stars 14 forks source link

Displaying application version in examples #7

Closed lebogan closed 6 years ago

lebogan commented 6 years ago

I wrote a small application and used the define_version to display a literal string of the version. Since I built the app with crystal init app, there is already a module in version.cr that contains the version number. I tried this and it actually worked:

define_version "app #{App::VERSION}"

also:

define_version <<-VERSION
app #{App::VERSION}
Copyright ...
License ...
VERSION

Is this something you would consider including in the README? For me this means having only one place to bump versions.

Great shard. Thanks