Hi all,
I hit kind of a strange use-case and was wondering if anyone knew a way around it. I am currently hitting an issue then when I include exrm (a release package project) as a deps will break ex_docs ability to generate the docs (or maybe it is earmark .. not sure).
My question is how can I get the "task" (in this case "docs") from within the "def project" function? I don't need to include exrm when I am doing a mix docs build but I do need to make packaged builds of both :dev and :prod environments. I have already filed a bug with the exrm folks but I would love to work around this until such a time that a fix can be put into place.
Thanks for the help!
-Chris
P.S. Example mix.exs file created by running mix new Sandbox --sup and updated with packages
defmodule Sandbox.Mixfile do
use Mix.Project
def project do
[app: : sandbox,
version: "0.0.1",
deps_path: "deps",
lockfile: "mix.lock",
elixir: "~> 1.0",
deps: deps]
end
def application do
[applications: [:logger],
mod: {Sandbox, []}]
end
defp deps do
[
# It would be awesome if I can check if this is a docs build here...
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.7", only: :dev}
]
end
end