issuer v0.2.2 Issuer.Utils

Summary

Functions

Examples

Returns “leaves” for VCS tags. Those might be the the next version tag. For instance, current elixir git repo has these leaves:

  • "v0.15.1"
  • "v1.3.3"
  • "v1.4.0-rc.1"

Examples

Returns “sprouts” for VCS tags. Those might be the the next version tag

Functions

functions!()

Examples

iex> with {name, _} <- Issuer.Utils.functions! |> List.last, do: name
:"Mix.Tasks.Issuer.Version#run/1"
interface_changes!()
interface_changes?(neu \\ Issuer.Utils.functions!())
leaves(tags)

Returns “leaves” for VCS tags. Those might be the the next version tag. For instance, current elixir git repo has these leaves:

  • "v0.15.1"
  • "v1.3.3"
  • "v1.4.0-rc.1"

The function will filter out all the existing tags to these:

iex> Issuer.Utils.leaves([]) |> Enum.count
1

iex> tags = ["v1.4.0-rc.1", "v1.4.0-dev",
...> "v1.3.3", "v1.3.2", "v1.3.1", "v1.3.0", "v1.3.0-rc.1", "v1.3.0-rc.0", "v1.2.6",
...> "v1.2.5", "v1.2.4", "v1.2.3", "v1.2.2", "v1.2.1", "v1.2.0", "v1.2.0-rc.1",
...> "v1.2.0-rc.0", "v1.1.1", "v1.1.0", "v1.1.0-rc.0", "v1.0.5", "v1.0.4", "v1.0.3",
...> "v1.0.2", "v1.0.1", "v1.0.0", "v1.0.0-rc2", "v1.0.0-rc1", "v0.15.1", "v0.15.0",
...> "v0.14.3", "v0.14.2", "v0.14.1", "v0.14.0", "v0.13.3", "v0.13.2", "v0.13.1",
...> "v0.13.0", "v0.12.5", "v0.12.4", "v0.12.3", "v0.12.2", "v0.12.1", "v0.12.0",
...> "v0.11.2", "v0.11.1", "v0.11.0", "v0.10.3", "v0.10.2", "v0.10.1", "v0.10.0",
...> "v0.9.3"]
...> tags |> Issuer.Utils.leaves
["v1.4.0-rc.1", "v1.3.3", "v0.15.1"]
modules!()

Examples

iex> Issuer.Utils.modules! |> List.last
Mix.Tasks.Issuer.Version
prefix_version(v)
sprouts(tags)

Returns “sprouts” for VCS tags. Those might be the the next version tag.

iex> ["0.0.1"] |> Issuer.Utils.sprouts
["0.0.2", "0.1.0", "0.1.0-dev", "0.1.0-rc.1", "1.0.0", "1.0.0-dev", "1.0.0-rc.1"]

iex> ["0.1.1-rc2"] |> Issuer.Utils.sprouts
["0.1.1", "0.1.1-rc3"]

iex> tags = ["v1.4.0-rc.1", "v1.4.0-dev",
...> "v1.3.3", "v1.3.2", "v1.3.1", "v1.3.0", "v1.3.0-rc.1", "v1.3.0-rc.0", "v1.2.6",
...> "v1.2.5", "v1.2.4", "v1.2.3", "v1.2.2", "v1.2.1", "v1.2.0", "v1.2.0-rc.1",
...> "v1.2.0-rc.0", "v1.1.1", "v1.1.0", "v1.1.0-rc.0", "v1.0.5", "v1.0.4", "v1.0.3",
...> "v1.0.2", "v1.0.1", "v1.0.0", "v1.0.0-rc2", "v1.0.0-rc1", "v0.15.1", "v0.15.0",
...> "v0.14.3", "v0.14.2", "v0.14.1", "v0.14.0", "v0.13.3", "v0.13.2", "v0.13.1",
...> "v0.13.0", "v0.12.5", "v0.12.4", "v0.12.3", "v0.12.2", "v0.12.1", "v0.12.0",
...> "v0.11.2", "v0.11.1", "v0.11.0", "v0.10.3", "v0.10.2", "v0.10.1", "v0.10.0",
...> "v0.9.3"]
...> tags |> Issuer.Utils.sprouts
["v1.4.0", "v1.4.0-rc.2", "v1.3.4", "v2.0.0", "v0.15.2", "v0.16.0", "v1.0.0"]
unprefix_version(v)
version!(v)
version?(v \\ "0.0.1")
version_in_mix?(arg1 \\ false)
version_valid?(v)