Created
October 24, 2015 11:38
-
-
Save remiq/f95f349a7751505a3d12 to your computer and use it in GitHub Desktop.
Releasing Phoenix with Mix aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule PhoenixApp.Mixfile do | |
use Mix.Project | |
def project do | |
[app: :phoenix_app, | |
# ... | |
aliases: aliases, | |
deps: deps] | |
end | |
# ... | |
defp deps do | |
[{:phoenix, "~> 1.0.3"}, | |
# ... | |
{:exrm, "~> 0.19"}, | |
{:cowboy, "~> 1.0"}] | |
end | |
defp aliases do | |
["ecto.setup": ["ecto.create", "ecto.migrate", "run priv/repo/seeds.exs"], | |
# ... | |
brunch: &brunch/1, | |
r: ["brunch", "phoenix.digest", "release"] | |
] | |
end | |
defp brunch(_args) do | |
{stdout, _status} = System.cmd("brunch", ["b"]) | |
IO.puts stdout | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment