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 Responses
odix67
one possible solution is to use git itself to rewrite the url
josevalim
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
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #javascript
- #code-sync
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








