HaxeFoundation / haxelib

The Haxe library manager
https://lib.haxe.org/
MIT License
173 stars 77 forks source link

haxelib git without .git folder? #493

Open CrazyFlasher opened 4 years ago

CrazyFlasher commented 4 years ago

Using Haxe 4.0.1

Is it possible to install haxelib with "haxelib git " command, but do not clone .git folder, that contains all history?

Git git cloning can be done that way in this case:

git clone --depth=1 <remote_repo_url>

If I run command like this haxelib git starling-extensions-hx https://github.com/CrazyFlasher/starling-extensions-hx.git --depth=1 haxelib clones, then deletes everything git folder because it's looking for branch --depth=1 :)

RealyUniqueName commented 4 years ago

There's no such option in haxelib. As a workaround you can clone a lib manually and then haxelib dev libname path/to/cloned/lib

CrazyFlasher commented 4 years ago

It's not a workaround it my case. Currently I use local haxelib that downloads needed libs during ci build. If library is git, it deletes it and re-downloads, because I use --always flag to be sure that specified commit is taken. And .git folder that contains hostory is huge in some cases. It would be cool if haxelib won't re-download lib from git, if specified commit is already present. Or update it in case of branch

Gama11 commented 4 years ago

It sounds like you would be much happier with lix than haxelib. I guess you're using OpenFL though? Maybe you'll have to wait for https://github.com/haxelime/lime/pull/1381 then to be able to use it with lix.