From 0b23a620af427634d73f712f9325c48f7a0eb342 Mon Sep 17 00:00:00 2001 From: Marcel Otto Date: Thu, 17 Mar 2022 23:22:51 +0100 Subject: [PATCH] Allow easy switching of RDF.ex packages during development --- mix.exs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/mix.exs b/mix.exs index ae13ac4..5d08183 100644 --- a/mix.exs +++ b/mix.exs @@ -63,7 +63,7 @@ defmodule JSON.LD.Mixfile do defp deps do [ - {:rdf, "~> 0.9"}, + rdf_ex_dep(:rdf, "~> 0.9"), {:jason, "~> 1.2"}, {:httpoison, "~> 1.6"}, {:dialyxir, "~> 1.1", only: :dev, runtime: false}, @@ -73,6 +73,13 @@ defmodule JSON.LD.Mixfile do ] end + defp rdf_ex_dep(dep, version) do + case System.get_env("RDF_EX_PACKAGES_SRC") do + "LOCAL" -> {dep, path: "../#{dep}"} + _ -> {dep, version} + end + end + defp dialyzer do [ plt_file: {:no_warn, "priv/plts/dialyzer.plt"}