Tuesday 30 May 2017

download the code of a particular tag of a git repo using Node

I want to download the source code of a private git repo hosted on github for only a particular tag. As far as I can tell there's an option of using git clone --depth=1. I suppose this is the answer on how to use tags with this.

Now I want to do it in a Node.js script. I checked the NodeGit package which uses libgit2. The problem is libgit2 doesn't support passing depth parameter.

So I am stuck with the last option of using child-process which I don't want to do, as it looks like a workaround. Is there any other way of achieving this?



via noob

No comments:

Post a Comment