l3nz
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.3.6 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.
You can find it on GitHub at GitHub - l3nz/say_cheez_ex: Say Cheez! for Elixir · GitHub
Comments welcome.
Trending in Announcing
Other Trending Topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #ai
- #genstage
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










Showing Posts 1 to 4- Show Best Posts
- Show All Posts (oldest first)
- Show All Posts (newest first)
l3nz
Version 0.2.2 is out, with a major bug fix and a number of new system attributes (thanks @voltone for help!). Some of the attributes are as below:
olivermt
It is a funny name, but I would consider SEO here as well. If I had the need to find build time capturing on hex I would never find this lib
l3nz
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.
l3nz
As a Saturday morning activity, I released a new version (0.3.5) that prints captured values on stdout only when building in environment
:prod. This should make logging less noisy.Version 0.3. introduced Graphviz / PlantUML graphs to be embedded in the project ExDocs - so you can easily create, e.g. diagrams of the inter-dependencies between multiple Gen Servers.