Skip to content

Commit

Permalink
Bump release and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
kipcole9 committed May 23, 2023
1 parent 194a914 commit 63cd9cb
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 4 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## Cldr Utils version 2.24.0

This is the changelog for Cldr Utils v2.24.0 released on May 22nd, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)

**Cldr Utils now requires Elixir 1.11 or later**

### Enhancements

* Adds `Cldr.Utils.otp_version/0` to return the OTP version as a string. Copied with thanks and appreciation from the `Hex` source.

## Cldr Utils version 2.23.1

This is the changelog for Cldr Utils v2.23.0 released on May 4th, 2023. For older changelogs please consult the release tag on [GitHub](https://github.com/elixir-cldr/cldr_utils/tags)
Expand Down
26 changes: 24 additions & 2 deletions lib/cldr_utils.ex
Original file line number Diff line number Diff line change
@@ -1,3 +1,25 @@
defmodule CldrUtils do
@moduledoc false
defmodule Cldr.Utils do
@moduledoc """
CLDR Utility functions.
"""

@doc """
Returns the current OTP version.
"""
def otp_version do
major = :erlang.system_info(:otp_release) |> List.to_string()
vsn_file = Path.join([:code.root_dir(), "releases", major, "OTP_VERSION"])

try do
{:ok, contents} = File.read(vsn_file)
String.split(contents, "\n", trim: true)
else
[full] -> full
_ -> major
catch
:error, _ -> major
end
end
end
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Cldr.Utils.MixProject do
use Mix.Project

@version "2.23.1"
@version "2.24.0"
@source_url "https://github.com/elixir-cldr/cldr_utils"

def project do
Expand Down
2 changes: 1 addition & 1 deletion test/cldr_utils_test.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule CldrUtilsTest do
use ExUnit.Case, async: true

doctest CldrUtils
doctest Cldr.Utils

doctest Cldr.Math
doctest Cldr.Digits
Expand Down

0 comments on commit 63cd9cb

Please sign in to comment.