Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any way to have rebar get-deps check a local cache before cloning a repository?

Tags:

erlang

rebar

I have a project with several dependencies on remote repositories (all on github.com at the moment if that helps). The dependencies don't change often. It would be nice if there was a way to keep the existing rebar.conf files the same so that they pointed to the upstream repositories, but to be able to cache the repos (or a snapshot) locally so that clean builds don't need go to the internet.

Is there anyway of doing this? I.e. rebar command line options, environment settings, git options, etc.?

like image 826
Frank Hunleth Avatar asked Oct 07 '13 19:10

Frank Hunleth


1 Answers

I suppose you could do couple of things:

  1. Make your own local clone of all repositories and change rebar.config to take this repos from it. On the first look it seems horrible solution, but it has a lot of advantages. Github is often not available, clone speed will increase, and the last most valuable is: projects are evolving and one day you will find that everything is broken because one of the deps has changed their APi in master branch.
  2. You could do local deps folder with all you need repos and share it via symlink with every repo you need.
like image 144
danechkin Avatar answered Oct 26 '22 16:10

danechkin