From 08c6f8ec6dac6b784791c5203e52d1526a8f828e Mon Sep 17 00:00:00 2001 From: Eric Sullivan Date: Wed, 24 Jan 2018 20:57:58 -0500 Subject: [PATCH] publish alias --- mix.exs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/mix.exs b/mix.exs index 9dafd79..32a2f79 100644 --- a/mix.exs +++ b/mix.exs @@ -21,6 +21,7 @@ defmodule Curator.Mixfile do homepage_url: @url, docs: docs(), dialyzer: [plt_add_deps: :project], + aliases: aliases(), ] end @@ -58,4 +59,12 @@ defmodule Curator.Mixfile do files: ["lib", "mix.exs", "README*", "LICENSE*", "CHANGELOG.md"], ] end + + defp aliases do + ["publish": ["hex.publish", &git_tag/1]] + end + + defp git_tag(_args) do + System.cmd "git", ["tag", "v" <> Mix.Project.config[:version]] + end end