2

I am developing a Cordova plugin that depends on a large binary file (a custom ios framework) which can be larger than 300MB. That is too large to check into our git repository and I dont think that would be the right solution anyway.

However, I want the binary file to be there when user of the plugin first install it via Cordova command line:

cordova plugin install https://path.to.the.plugin.on.github

Cordova will automatically clone the git repository. What I am wondering is how to automatically download the binary file from another source such as S3 and place it in the correct location? Is this not possible?

Aras
  • 5,878
  • 9
  • 49
  • 76
  • 1
    can't it execute "after install" commands? this way you can have a script to handle the download. – Gntem Mar 03 '14 at 21:17
  • pretty sure cordova does not have such "after install" hook, but I will checkc again. If you know, please put as answer, because that would definitely solve my problem – Aras Mar 03 '14 at 21:34
  • 1
    I've never used it before, but [Git Annex](https://git-annex.branchable.com/) is supposed to help you manage large files with Git somehow, so maybe that might be worth checking out. –  Mar 04 '14 at 03:10
  • @Cupcake I think Git Annex requires configuring each repo to sync data which really defeats the purpose in this case. I am looking for a technique that needs 0 configuration when the repo gets cloned. Thanks anyway. – Aras Mar 04 '14 at 06:26
  • Related discussions on big binary files & git: http://stackoverflow.com/questions/540535/managing-large-binary-files-with-git http://stackoverflow.com/questions/3161588/git-analog-to-hgs-bigfiles-extension http://stackoverflow.com/questions/17888604/git-with-large-files – eis Mar 04 '14 at 07:18

1 Answers1

1

What I am wondering is how to automatically download the binary file from another source such as S3 and place it in the correct location?

Not through git itself.
You could set up a post-checkout hook in order to take care of that step, but a hook isn't propagated through git push/pull.

It is easier to store a script (in that git repo) that the user of that repo can call on demand in order to download/update that binary.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • thanks for your answer @VonC. that is the conclusion I came to as well, to add a shell script to download the file using `curl` – Aras Mar 04 '14 at 07:30