sandorbedo

sandorbedo

Alternative deps.get task

I need to create a mix task, that’s purpose is to replace deps.get. (The reason is that in our company we are not allowed to use any git source from the internet, like github, but have to download deps from an internal, controlled server. External deps are mirrored to the internal server when required. But in mix.exs and rebar.config, we use the original git URLs. This alternative deps.get task has to rewrite the URLs before downloading them, and when the external dep does not have an internal copy, it also has to initiate the mirroring procedure.)

My problem here is that when I create a new task, like (let’s call it deps_get), it is just an ordinary task, and wants to run the original deps.get before it runs. Is it possible to make my own task able to run without the deps being downloaded in advance? Or maybe the goal of deps_get is only achievable by allowing to download the external deps by the original deps.get, and then run another task that replaces the external deps with the internal ones?

Most Liked

odix67

odix67

one possible solution is to use git itself to rewrite the url

josevalim

josevalim

Creator of Elixir

Git rewrite urls as mentioned by @odix67: mix deps — Mix v1.13.4

You can also use Hex repositories but change the Hex repository URL / API to point to a self-hosted Hex: https://hex.pm/docs/self_hosting

Last Post!

imsoulfly

imsoulfly

Hey there,
welcome to the same problem we had in my company as well. Have you checked if the following repos/projects might suffice for your problem as well. The second one is a solution that also run in my companys infrastructure and is basically built upon Wojteks idea

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
komlanvi
Hi everyone, I was playing with phoenix liveView but I run into an issue. I have a form and want to validate each input text when the te...
New

Other popular topics Top

New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54996 245
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31525 112
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement