diff --git a/README.md b/README.md index df28479..2ab8f8b 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ variety of languages and technologies. These are things that don't really warrant a full blog post. These are mostly things I learn by pairing with smart people at [Hashrocket](http://hashrocket.com/). -_473 TILs and counting..._ +_474 TILs and counting..._ --- @@ -87,6 +87,7 @@ _473 TILs and counting..._ - [Binary Representation Of A String](elixir/binary-representation-of-a-string.md) - [Check For A Substring Match](elixir/check-for-a-substring-match.md) - [Create A Date With The Date Sigil](elixir/create-a-date-with-the-date-sigil.md) +- [Determine The Latest Release Of A Hex Package](elixir/determine-the-latest-release-of-a-hex-package.md) - [Do You Have The Time?](elixir/do-you-have-the-time.md) - [Do You Have The Time? - Part 2](elixir/do-you-have-the-time-part-2.md) - [Documentation Lookup With Vim And Alchemist](elixir/documentation-lookup-with-vim-and-alchemist.md) diff --git a/elixir/determine-the-latest-release-of-a-hex-package.md b/elixir/determine-the-latest-release-of-a-hex-package.md new file mode 100644 index 0000000..940f5ea --- /dev/null +++ b/elixir/determine-the-latest-release-of-a-hex-package.md @@ -0,0 +1,27 @@ +# Determine The Latest Release Of A Hex Package + +I will often pop open the browser and do a Google search in order to figure +out the latest release of a package when adding it to my dependencies. +However, lately I've been getting in the habit of using a quicker approach. +The `mix` CLI has a way of looking up info about a package and we don't have +to leave the terminal to use it. + +For instance, if I need to determine the latest version of the `postgrex` +package, I can run the following command. + +```bash +$ mix hex.info postgrex +PostgreSQL driver for Elixir. + +Config: {:postgrex, "~> 0.12.0"} +Releases: 0.12.0, 0.11.2, 0.11.1, 0.11.0, 0.10.0, 0.9.1, 0.9.0, 0.8.4, 0.8.3, 0.8.2, ... + +Maintainers: Eric Meadows-Jönsson, James Fish +Licenses: Apache 2.0 +Links: + Github: https://github.com/elixir-ecto/postgrex +``` + +The third line gives me the info I need (`{:postgrex, "~> 0.12.0"}`) and it +is already formatted as a tuple that I can paste right into my `mix.exs` +file.