bernd / fpm-cookery

A tool for building software packages with fpm.
Other
460 stars 88 forks source link

Retrieve attributes from `recipe.rb` #160

Closed josegonzalez closed 8 years ago

josegonzalez commented 8 years ago

It would be great to be able to expose an attribute(s) from a recipe.rb file so that it can be used in a build toolchain. For instance, one might have a system that:

Currently such a thing would require either grep on the recipe.rb file - blech - or knowing what the attributes are, which doesn't lend itself well to generic build processes.

Instead, it would be great to have something like the following:

fpm-cook inspect --format '{{ .name }}_{{ .version }}_{{ .architecture }}.deb'

Which would spit out a "formatted" version of a recipe's attributes. FWIW, the inspect call templating is inspired by the one from docker, which are more or less like golang templates.

bernd commented 8 years ago

Should be fixed by #165