Skip to content

Instantly share code, notes, and snippets.

@remiq
Created October 24, 2015 11:38
Show Gist options
  • Save remiq/f95f349a7751505a3d12 to your computer and use it in GitHub Desktop.
Save remiq/f95f349a7751505a3d12 to your computer and use it in GitHub Desktop.
Releasing Phoenix with Mix aliases
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