I am releasing SayCheezEx, a library to capture the build time environment in a very simple and concise way.
When I deploy a release, I always want it to embed its own version, Git sha revision, when it was built… all that stuff. An I never remember the exact Git incantations, and sometimes different versions of Git are slightly incompatible on date formatting.
So I just create a module attribute like:
@version cheez! "{:project_version}/{:git_commit_id} {:build_number} on {:build_on}"
And SayCheez takes care of the rest. It can access a set of attributes SayCheezEx — say_cheez_ex v0.2.1 and/or the environment variables, with defaults if they should not be found. It can try multiple items (because sometimes there is a different environment on different CI servers) until one is found.
I mean, it’s not rocket science, but it’s pretty handy.
I just did some test searching with keywords on hex.pm and the results appear pretty random. Take a project description, paste it almost verbatim, and you get a ton of other projects.